Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan-cp committed Apr 12, 2024
1 parent 89a3863 commit 83720c8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -399,7 +398,6 @@ export function createVirtualizedFeedEventItems({
eventId: 'suggested-profile-row',
itemType: null,
} as FeedListItemType);
insertedRow = true;
}
}
itemsWithSuggestedProfileRow.push(item);
Expand Down

0 comments on commit 83720c8

Please sign in to comment.