Replace {'inbox-star-icon': isInboxStarred} with {'flag-icon': isFlagged} for future improvements

This commit is contained in:
djmaze 2021-08-24 21:10:49 +02:00
parent db1615f2ca
commit 8934205ede
6 changed files with 14 additions and 17 deletions

View file

@ -40,13 +40,6 @@ export class FolderListMailBoxUserView extends AbstractViewLeft {
this.allowContacts = AppUserStore.allowContacts();
this.folderListFocused = ko.computed(() => Scope.FolderList === AppUserStore.focusedState());
this.isInboxStarred = ko.computed(
() =>
FolderUserStore.currentFolder() &&
FolderUserStore.currentFolder().isInbox() &&
MessageUserStore.listSearch().trim().includes('is:flagged')
);
}
onBuild(dom) {
@ -93,7 +86,7 @@ export class FolderListMailBoxUserView extends AbstractViewLeft {
setFolderHash(folder.fullNameRaw, '');
}
rl.route.setHash((eqs(event, '.b-folders li a.selectable .inbox-star-icon') && !this.isInboxStarred())
rl.route.setHash((eqs(event, '.b-folders li a.selectable .flag-icon') && !folder.isFlagged())
? mailBox(folder.fullNameHash, 1, 'is:flagged')
: mailBox(folder.fullNameHash)
);