Fix render ancient dialog

Fix saving contacts list to state
This commit is contained in:
morethanwords 2020-10-31 01:13:08 +02:00
parent 2202b6507a
commit 72951925b8
2 changed files with 10 additions and 2 deletions

View File

@ -518,12 +518,18 @@ export class AppDialogsManager {
}); });
} }
if(!result.dialogs.length || this.chatList.childElementCount == result.count) { // loaded all // * loaded all
//if(!result.dialogs.length || this.chatList.childElementCount == result.count) {
// !result.dialogs.length не подходит, так как при супердревном диалоге getConversations его не выдаст.
if(this.chatList.childElementCount == result.count) {
this.loadedAll = true; this.loadedAll = true;
} }
this.log.debug('getDialogs ' + loadCount + ' dialogs by offset:', offsetIndex, result, this.chatList.childElementCount); this.log.debug('getDialogs ' + loadCount + ' dialogs by offset:', offsetIndex, result, this.chatList.childElementCount);
this.scroll.onScroll();
setTimeout(() => {
this.scroll.onScroll();
}, 0);
} catch(err) { } catch(err) {
this.log.error(err); this.log.error(err);
} }

View File

@ -100,6 +100,8 @@ export class AppUsersManager {
for(const userID of contactsList) { for(const userID of contactsList) {
appStateManager.setPeer(userID, this.getUser(userID)); appStateManager.setPeer(userID, this.getUser(userID));
} }
appStateManager.pushToState('contactsList', contactsList);
}); });
appStateManager.getState().then((state) => { appStateManager.getState().then((state) => {