From 1b00de14a62ee0bf753d8cde04f1849c127af89b Mon Sep 17 00:00:00 2001 From: oakes Date: Tue, 28 Feb 2023 15:23:02 -0500 Subject: [PATCH 1/2] Fix conversation list pagination --- .../features/conversations/components/conversations-list.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/soapbox/features/conversations/components/conversations-list.tsx b/app/soapbox/features/conversations/components/conversations-list.tsx index bf439626a..b170c5547 100644 --- a/app/soapbox/features/conversations/components/conversations-list.tsx +++ b/app/soapbox/features/conversations/components/conversations-list.tsx @@ -16,6 +16,7 @@ const ConversationsList: React.FC = () => { const conversations = useAppSelector((state) => state.conversations.items); const isLoading = useAppSelector((state) => state.conversations.isLoading); + const hasMore = useAppSelector((state) => state.conversations.hasMore === true); const getCurrentIndex = (id: string) => conversations.findIndex(x => x.id === id); @@ -50,6 +51,7 @@ const ConversationsList: React.FC = () => { return ( Date: Tue, 28 Feb 2023 15:30:01 -0500 Subject: [PATCH 2/2] Remove unnecessary equality test --- .../features/conversations/components/conversations-list.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/features/conversations/components/conversations-list.tsx b/app/soapbox/features/conversations/components/conversations-list.tsx index b170c5547..65c2ef3e1 100644 --- a/app/soapbox/features/conversations/components/conversations-list.tsx +++ b/app/soapbox/features/conversations/components/conversations-list.tsx @@ -16,7 +16,7 @@ const ConversationsList: React.FC = () => { const conversations = useAppSelector((state) => state.conversations.items); const isLoading = useAppSelector((state) => state.conversations.isLoading); - const hasMore = useAppSelector((state) => state.conversations.hasMore === true); + const hasMore = useAppSelector((state) => state.conversations.hasMore); const getCurrentIndex = (id: string) => conversations.findIndex(x => x.id === id);