Reapply accidentally reverted fixes (#5339)

This commit is contained in:
zubiden 2024-12-29 11:58:47 +01:00 committed by Alexander Zinchuk
parent 3abd843dd5
commit ed761133bc
2 changed files with 1 additions and 5 deletions

View File

@ -446,10 +446,10 @@ function reduceChats<T extends GlobalState>(global: T): GlobalState['chats'] {
...currentUserId ? [currentUserId] : [],
...currentChatIds,
...messagesChatIds,
...global.recentlyFoundChatIds || [],
...getOrderedIds(ARCHIVED_FOLDER_ID)?.slice(0, GLOBAL_STATE_CACHE_ARCHIVED_CHAT_LIST_LIMIT) || [],
...getOrderedIds(ALL_FOLDER_ID) || [],
...getOrderedIds(SAVED_FOLDER_ID) || [],
...global.recentlyFoundChatIds || [],
...Object.keys(byId),
]).slice(0, GLOBAL_STATE_CACHE_CHAT_LIST_LIMIT);

View File

@ -374,10 +374,6 @@ export function updateChatListSecondaryInfo<T extends GlobalState>(
...global.chats.totalCount,
[totalCountKey]: info.totalChatCount,
},
isFullyLoaded: {
...global.chats.isFullyLoaded,
[type]: false,
},
},
};
}