Fix loading emoji pack
This commit is contained in:
parent
ae85630fbd
commit
18095d0406
@ -102,10 +102,6 @@ export default function createManagers(appStoragesManager: AppStoragesManager, u
|
||||
ctx[name] = manager;
|
||||
}
|
||||
|
||||
if(userId) {
|
||||
managers.apiManager.setUserAuth(userId);
|
||||
}
|
||||
|
||||
const promises: Array<Promise<(() => void) | void> | void>[] = [];
|
||||
let names = Object.keys(managers) as (keyof T)[];
|
||||
names.unshift('appUsersManager', 'appChatsManager', 'appNotificationsManager', 'appMessagesManager', 'dialogsStorage');
|
||||
@ -125,5 +121,9 @@ export default function createManagers(appStoragesManager: AppStoragesManager, u
|
||||
}
|
||||
}
|
||||
|
||||
if(userId) {
|
||||
managers.apiManager.setUserAuth(userId);
|
||||
}
|
||||
|
||||
return Promise.all(promises).then(() => managers);
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ export function isServiceWorkerOnline() {
|
||||
}
|
||||
|
||||
const log = logger('MTPROTO');
|
||||
// let haveState = false;
|
||||
|
||||
const port = new MTProtoMessagePort<false>();
|
||||
port.addMultipleEventsListeners({
|
||||
@ -41,6 +42,10 @@ port.addMultipleEventsListeners({
|
||||
},
|
||||
|
||||
state: ({state, resetStorages, pushedKeys, newVersion, oldVersion, userId}) => {
|
||||
// if(haveState) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
log('got state', state, pushedKeys);
|
||||
|
||||
appStateManager.userId = userId;
|
||||
@ -52,6 +57,7 @@ port.addMultipleEventsListeners({
|
||||
});
|
||||
|
||||
RESET_STORAGES_PROMISE.resolve(resetStorages);
|
||||
// haveState = true;
|
||||
},
|
||||
|
||||
toggleStorages: ({enabled, clearWrite}) => {
|
||||
|
Loading…
Reference in New Issue
Block a user