Cleanup some code

This commit is contained in:
djmaze 2021-08-25 13:22:40 +02:00
parent ddb6daace6
commit 3ad9bb6258
3 changed files with 7 additions and 9 deletions

View file

@ -86,9 +86,10 @@ export class FolderListMailBoxUserView extends AbstractViewLeft {
setFolderHash(folder.fullNameRaw, '');
}
rl.route.setHash((event.target.matches('.flag-icon') && !folder.isFlagged())
? mailBox(folder.fullNameHash, 1, 'is:flagged')
: mailBox(folder.fullNameHash)
rl.route.setHash(
mailBox(folder.fullNameHash, 1,
(event.target.matches('.flag-icon') && !folder.isFlagged()) ? 'is:flagged' : ''
)
);
}

View file

@ -607,16 +607,14 @@ class MessageViewMailBoxUserView extends AbstractViewRight {
.filter(v => v);
if (hashes.length) {
Remote.attachmentsActions('Zip', hashes, this.downloadAsZipLoading)
.then((result) => {
.then(result => {
if (result && result.Result && result.Result.FileHash) {
rl.app.download(attachmentDownload(result.Result.FileHash));
} else {
this.downloadAsZipError(true);
}
})
.catch(() => {
this.downloadAsZipError(true);
});
.catch(() => this.downloadAsZipError(true));
} else {
this.highlightUnselectedAttachments(true);
}