Channel: Fix opening comments (#3454)
This commit is contained in:
parent
0f04434b65
commit
b39b3de86b
@ -1037,7 +1037,7 @@ async function loadViewportMessages<T extends GlobalState>(
|
||||
|
||||
global = addUsers(global, buildCollectionByKey(users, 'id'));
|
||||
global = addChats(global, buildCollectionByKey(chats, 'id'));
|
||||
global = updateThreadInfos(global, chatId, repliesThreadInfos);
|
||||
global = updateThreadInfos(global, repliesThreadInfos);
|
||||
|
||||
let listedIds = selectListedIds(global, chatId, threadId);
|
||||
const outlyingList = offsetId ? selectOutlyingListByMessageId(global, chatId, threadId, offsetId) : undefined;
|
||||
|
||||
@ -175,7 +175,7 @@ async function loadAndReplaceMessages<T extends GlobalState>(global: T, actions:
|
||||
global = updateChats(global, buildCollectionByKey(result.chats, 'id'));
|
||||
global = updateUsers(global, buildCollectionByKey(result.users, 'id'));
|
||||
if (result.repliesThreadInfos.length) {
|
||||
global = updateThreadInfos(global, currentChatId, result.repliesThreadInfos);
|
||||
global = updateThreadInfos(global, result.repliesThreadInfos);
|
||||
}
|
||||
|
||||
areMessagesLoaded = true;
|
||||
|
||||
@ -490,10 +490,10 @@ export function updateThreadInfo<T extends GlobalState>(
|
||||
}
|
||||
|
||||
export function updateThreadInfos<T extends GlobalState>(
|
||||
global: T, chatId: string, updates: Partial<ApiThreadInfo>[],
|
||||
global: T, updates: Partial<ApiThreadInfo>[],
|
||||
): T {
|
||||
updates.forEach((update) => {
|
||||
global = updateThreadInfo(global, chatId, update.threadId!, update);
|
||||
global = updateThreadInfo(global, update.chatId!, update.threadId!, update);
|
||||
});
|
||||
|
||||
return global;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user