Browse Source

Fix own peer color

Fix load state if too few dialogs
Fix opening chat with first album
master
Eduard Kuzmenko 4 years ago
parent
commit
f4ad77576b
  1. 17
      src/lib/appManagers/appDialogsManager.ts
  2. 1
      src/lib/appManagers/appImManager.ts

17
src/lib/appManagers/appDialogsManager.ts

@ -329,19 +329,16 @@ export class AppDialogsManager { @@ -329,19 +329,16 @@ export class AppDialogsManager {
//selectTab(0);
(this.folders.menu.firstElementChild.firstElementChild as HTMLElement).click();
/* false && */appStateManager.getState().then(() => {
return appMessagesManager.filtersStorage.getDialogFilters();
}).then(filters => {
for(const filterID in filters) {
this.addFilter(filters[filterID]);
}
appStateManager.getState().then((state) => {
const getFiltersPromise = !state.filters || Object.keys(state.filters).length ? appMessagesManager.filtersStorage.getDialogFilters() : Promise.resolve({});
getFiltersPromise.then((filters) => {
for(const filterID in filters) {
this.addFilter(filters[filterID]);
}
});
return this.loadDialogs();
}).then(result => {
//this.setPinnedDelimiter();
//appSidebarLeft.onChatsScroll();
//this.loadDialogs(1);
appMessagesManager.getConversationsAll('', 1).then(() => {
this.accumulateArchivedUnread();
});

1
src/lib/appManagers/appImManager.ts

@ -2551,6 +2551,7 @@ export class AppImManager { @@ -2551,6 +2551,7 @@ export class AppImManager {
for(let i = additionMsgIDs.length - 1; i >= 0; --i) {
const message = appMessagesManager.getMessage(additionMsgIDs[i]);
if(message.grouped_id) additionMsgIDs.splice(i, 1);
else break;
}
maxID = additionMsgIDs[additionMsgIDs.length - 1] || maxID;

Loading…
Cancel
Save