Browse Source

Fix filtering muted dialogs

master
Eduard Kuzmenko 3 years ago
parent
commit
f55281930e
  1. 3
      src/lib/appManagers/appDialogsManager.ts
  2. 4
      src/lib/storages/dialogs.ts

3
src/lib/appManagers/appDialogsManager.ts

@ -463,6 +463,7 @@ export class AppDialogsManager {
}); });
rootScope.addEventListener('dialog_notify_settings', (dialog) => { rootScope.addEventListener('dialog_notify_settings', (dialog) => {
this.validateDialogForFilter(dialog);
this.setUnreadMessages(dialog); // возможно это не нужно, но нужно менять is-muted this.setUnreadMessages(dialog); // возможно это не нужно, но нужно менять is-muted
this.setFiltersUnreadCount(); this.setFiltersUnreadCount();
}); });
@ -690,8 +691,6 @@ export class AppDialogsManager {
for(const filterId in this.filtersRendered) { for(const filterId in this.filtersRendered) {
this.setFilterUnreadCount(+filterId); this.setFilterUnreadCount(+filterId);
} }
this.setFilterUnreadCount(0);
} }
/** /**

4
src/lib/storages/dialogs.ts

@ -137,6 +137,10 @@ export default class DialogsStorage {
delete this.folders[filter.id]; delete this.folders[filter.id];
}); });
rootScope.addEventListener('dialog_notify_settings', (dialog) => {
this.processDialogForFilters(dialog);
});
rootScope.addEventListener('chat_update', (chatId) => { rootScope.addEventListener('chat_update', (chatId) => {
const chat: Chat.chat = this.appChatsManager.getChat(chatId); const chat: Chat.chat = this.appChatsManager.getChat(chatId);

Loading…
Cancel
Save