Folder Manager: Init before chat load (#4431)
This commit is contained in:
parent
e21249cf0f
commit
0e77008108
@ -68,6 +68,8 @@ addActionHandler('sync', (global, actions): ActionReturnType => {
|
||||
loadAllChats, preloadTopChatMessages, loadAllStories, loadAllHiddenStories,
|
||||
} = actions;
|
||||
|
||||
initFolderManager();
|
||||
|
||||
loadAllChats({
|
||||
listType: 'active',
|
||||
shouldReplace: true,
|
||||
@ -88,7 +90,6 @@ addActionHandler('sync', (global, actions): ActionReturnType => {
|
||||
console.log('>>> FINISH SYNC');
|
||||
}
|
||||
|
||||
initFolderManager();
|
||||
loadAllChats({ listType: 'archived', shouldReplace: true });
|
||||
loadAllChats({ listType: 'saved', shouldReplace: true });
|
||||
preloadTopChatMessages();
|
||||
|
||||
@ -96,6 +96,10 @@ export function setGlobal(newGlobal?: GlobalState, options?: ActionOptions) {
|
||||
|
||||
currentGlobal = newGlobal;
|
||||
|
||||
if (DEBUG) {
|
||||
DEBUG_currentCapturedId = Math.random();
|
||||
}
|
||||
|
||||
if (options?.forceSyncOnIOs) {
|
||||
forceOnHeavyAnimation = true;
|
||||
runCallbacks();
|
||||
@ -111,7 +115,6 @@ export function setGlobal(newGlobal?: GlobalState, options?: ActionOptions) {
|
||||
|
||||
export function getGlobal() {
|
||||
if (DEBUG) {
|
||||
DEBUG_currentCapturedId = Math.random();
|
||||
currentGlobal = {
|
||||
...currentGlobal,
|
||||
DEBUG_capturedId: DEBUG_currentCapturedId,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user