Fix new folder orderIndex

This commit is contained in:
morethanwords 2021-06-01 19:05:54 +03:00
parent dde8d61b0e
commit af9df0b22c
2 changed files with 10 additions and 1 deletions

View File

@ -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) {

View File

@ -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({