diff --git a/app/components/global_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap b/app/components/global_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap index 3fa782763..ededd6917 100644 --- a/app/components/global_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap +++ b/app/components/global_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap @@ -19,7 +19,7 @@ exports[`Global Thread Footer Should render for channel view and unfollow the th } userIds={ Array [ - "user1", + "user2", ] } /> @@ -99,6 +99,7 @@ exports[`Global Thread Footer Should render for global threads view 1`] = ` userIds={ Array [ "user1", + "user2", ] } /> diff --git a/app/components/global_threads/thread_footer/thread_footer.test.tsx b/app/components/global_threads/thread_footer/thread_footer.test.tsx index 3029a353e..962337c98 100644 --- a/app/components/global_threads/thread_footer/thread_footer.test.tsx +++ b/app/components/global_threads/thread_footer/thread_footer.test.tsx @@ -28,7 +28,7 @@ describe('Global Thread Footer', () => { thread: { id: 'thread1', participants: [{ - id: 'user1', + id: 'user2', }], is_following: true, reply_count: 2, diff --git a/app/components/global_threads/thread_footer/thread_footer.tsx b/app/components/global_threads/thread_footer/thread_footer.tsx index 16cf25e7c..bb74a338b 100644 --- a/app/components/global_threads/thread_footer/thread_footer.tsx +++ b/app/components/global_threads/thread_footer/thread_footer.tsx @@ -133,15 +133,13 @@ function ThreadFooter({actions, currentUserId, intl, location, testID, theme, th // threadstarter should be the first one in the avatars list const participants = React.useMemo(() => { if (thread.participants?.length) { - let isThreadStarterFound = false; const participantIds = thread.participants.flatMap((participant) => { - if (participant.id === threadStarter?.id) { - isThreadStarterFound = true; + if (location === GLOBAL_THREADS && participant.id === threadStarter?.id) { return []; } return participant.id; - }); - if (isThreadStarterFound) { + }).reverse(); + if (location === GLOBAL_THREADS) { participantIds.unshift(threadStarter?.id); } return participantIds;