diff --git a/src/components/Lists.tsx b/src/components/Lists.tsx index 8cbe2810e8..47a5bf8f15 100644 --- a/src/components/Lists.tsx +++ b/src/components/Lists.tsx @@ -13,12 +13,14 @@ import {Text} from '#/components/Typography' export function ListFooter({ isFetchingNextPage, + hasNextPage, error, onRetry, height, style, }: { isFetchingNextPage?: boolean + hasNextPage?: boolean error?: string onRetry?: () => Promise height?: number @@ -40,7 +42,19 @@ export function ListFooter({ {isFetchingNextPage ? ( ) : ( - + <> + {error ? ( + + ) : ( + <> + {!hasNextPage && ( + + End of list + + )} + + )} + )} ) diff --git a/src/screens/Messages/List/index.tsx b/src/screens/Messages/List/index.tsx index d083ae5baf..807cba6458 100644 --- a/src/screens/Messages/List/index.tsx +++ b/src/screens/Messages/List/index.tsx @@ -248,6 +248,7 @@ export function MessagesScreen({navigation, route}: Props) { error={cleanError(error)} onRetry={fetchNextPage} style={{borderColor: 'transparent'}} + hasNextPage={hasNextPage} /> } onEndReachedThreshold={3}