diff --git a/src/components/sidebarLeft/tabs/chatFolders.ts b/src/components/sidebarLeft/tabs/chatFolders.ts index ea5703aa..3c0c45a0 100644 --- a/src/components/sidebarLeft/tabs/chatFolders.ts +++ b/src/components/sidebarLeft/tabs/chatFolders.ts @@ -62,7 +62,9 @@ export default class AppChatFoldersTab extends SliderSuperTab { if(k) { d.push(i18n(k)); } - } else { + } + + if(!d.length) { const folder = appMessagesManager.dialogsStorage.getFolder(filter.id); let chats = 0, channels = 0, groups = 0; for(const dialog of folder) { diff --git a/src/lib/storages/filters.ts b/src/lib/storages/filters.ts index 48e84c45..130c9760 100644 --- a/src/lib/storages/filters.ts +++ b/src/lib/storages/filters.ts @@ -43,6 +43,13 @@ export default class FiltersStorage { this.appStateManager.getState().then((state) => { this.filters = state.filters; + + for(const filterId in this.filters) { + const filter = this.filters[filterId]; + if(filter.hasOwnProperty('orderIndex') && filter.orderIndex >= this.orderIndex) { + this.orderIndex = filter.orderIndex + 1; + } + } }); rootScope.addMultipleEventsListeners({