From 83720c87cd2d50a593331fed7bbfbb3d8e61d733 Mon Sep 17 00:00:00 2001 From: Rohan-cp Date: Fri, 12 Apr 2024 00:29:04 -0400 Subject: [PATCH] better --- .../src/components/Feed/createVirtualizedFeedEventItems.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/mobile/src/components/Feed/createVirtualizedFeedEventItems.ts b/apps/mobile/src/components/Feed/createVirtualizedFeedEventItems.ts index 4602dd61d..1d01f443d 100644 --- a/apps/mobile/src/components/Feed/createVirtualizedFeedEventItems.ts +++ b/apps/mobile/src/components/Feed/createVirtualizedFeedEventItems.ts @@ -384,10 +384,9 @@ export function createVirtualizedFeedEventItems({ let postCount = 0; const itemsWithSuggestedProfileRow = []; - let insertedRow = false; for (const item of items) { - if (!insertedRow && item.kind === 'post-item-header') { + if (item.kind === 'post-item-header') { postCount++; if (postCount === SUGGESTED_PROFILE_ROW_IDX) { itemsWithSuggestedProfileRow.push({ @@ -399,7 +398,6 @@ export function createVirtualizedFeedEventItems({ eventId: 'suggested-profile-row', itemType: null, } as FeedListItemType); - insertedRow = true; } } itemsWithSuggestedProfileRow.push(item);