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,
|
loadAllChats, preloadTopChatMessages, loadAllStories, loadAllHiddenStories,
|
||||||
} = actions;
|
} = actions;
|
||||||
|
|
||||||
|
initFolderManager();
|
||||||
|
|
||||||
loadAllChats({
|
loadAllChats({
|
||||||
listType: 'active',
|
listType: 'active',
|
||||||
shouldReplace: true,
|
shouldReplace: true,
|
||||||
@ -88,7 +90,6 @@ addActionHandler('sync', (global, actions): ActionReturnType => {
|
|||||||
console.log('>>> FINISH SYNC');
|
console.log('>>> FINISH SYNC');
|
||||||
}
|
}
|
||||||
|
|
||||||
initFolderManager();
|
|
||||||
loadAllChats({ listType: 'archived', shouldReplace: true });
|
loadAllChats({ listType: 'archived', shouldReplace: true });
|
||||||
loadAllChats({ listType: 'saved', shouldReplace: true });
|
loadAllChats({ listType: 'saved', shouldReplace: true });
|
||||||
preloadTopChatMessages();
|
preloadTopChatMessages();
|
||||||
|
|||||||
@ -96,6 +96,10 @@ export function setGlobal(newGlobal?: GlobalState, options?: ActionOptions) {
|
|||||||
|
|
||||||
currentGlobal = newGlobal;
|
currentGlobal = newGlobal;
|
||||||
|
|
||||||
|
if (DEBUG) {
|
||||||
|
DEBUG_currentCapturedId = Math.random();
|
||||||
|
}
|
||||||
|
|
||||||
if (options?.forceSyncOnIOs) {
|
if (options?.forceSyncOnIOs) {
|
||||||
forceOnHeavyAnimation = true;
|
forceOnHeavyAnimation = true;
|
||||||
runCallbacks();
|
runCallbacks();
|
||||||
@ -111,7 +115,6 @@ export function setGlobal(newGlobal?: GlobalState, options?: ActionOptions) {
|
|||||||
|
|
||||||
export function getGlobal() {
|
export function getGlobal() {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
DEBUG_currentCapturedId = Math.random();
|
|
||||||
currentGlobal = {
|
currentGlobal = {
|
||||||
...currentGlobal,
|
...currentGlobal,
|
||||||
DEBUG_capturedId: DEBUG_currentCapturedId,
|
DEBUG_capturedId: DEBUG_currentCapturedId,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user