mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Bugfix: some folders were invisible while they should be visible
It all came down to a very complex subscribe system. I changed that in a "is visible for whatever reason" system.
This commit is contained in:
parent
5264cd8225
commit
2cf2b1ee75
3 changed files with 38 additions and 35 deletions
|
|
@ -44,15 +44,14 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
|
||||
folderListVisible: () => {
|
||||
let multiple = false,
|
||||
inbox, subscribed, hasSub,
|
||||
inbox, visible,
|
||||
result = FolderUserStore.folderList().filter(folder => {
|
||||
if (folder.isInbox()) {
|
||||
inbox = folder;
|
||||
}
|
||||
subscribed = folder.subscribed();
|
||||
hasSub = folder.hasSubscribedSubfolders();
|
||||
multiple |= (!folder.isSystemFolder() || (hasSub && !folder.isInbox())) && (subscribed || hasSub)
|
||||
return !(folder.hidden() | folder.kolabType());
|
||||
visible = folder.visible();
|
||||
multiple |= visible && !folder.isInbox();
|
||||
return visible;
|
||||
});
|
||||
if (inbox && !multiple) {
|
||||
inbox.collapsedPrivate(false);
|
||||
|
|
@ -109,7 +108,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
|
||||
rl.route.setHash(
|
||||
mailBox(folder.fullNameHash, 1,
|
||||
(event.target.matches('.flag-icon') && !folder.isFlagged()) ? 'is:flagged' : ''
|
||||
(event.target.matches('.flag-icon') && !folder.isFlagged()) ? 'flagged' : ''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue