mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Replace {'inbox-star-icon': isInboxStarred} with {'flag-icon': isFlagged} for future improvements
This commit is contained in:
parent
db1615f2ca
commit
8934205ede
6 changed files with 14 additions and 17 deletions
|
|
@ -10,6 +10,7 @@ import * as Local from 'Storage/Client';
|
|||
|
||||
import { AppUserStore } from 'Stores/User/App';
|
||||
import { FolderUserStore } from 'Stores/User/Folder';
|
||||
import { MessageUserStore } from 'Stores/User/Message';
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
|
||||
import ko from 'ko';
|
||||
|
|
@ -252,6 +253,9 @@ export class FolderModel extends AbstractModel {
|
|||
|
||||
isInbox: () => FolderType.Inbox === folder.type(),
|
||||
|
||||
isFlagged: () => FolderUserStore.currentFolder() === folder
|
||||
&& MessageUserStore.listSearch().trim().includes('is:flagged'),
|
||||
|
||||
hasSubscribedSubfolders:
|
||||
() => !!folder.subFolders().find(
|
||||
oFolder => {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import { PgpUserStore } from 'Stores/User/Pgp';
|
|||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
import { NotificationUserStore } from 'Stores/User/Notification';
|
||||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
//import Remote from 'Remote/User/Fetch'; Circular dependency
|
||||
|
||||
const
|
||||
hcont = Element.fromHTML('<div area="hidden" style="position:absolute;left:-5000px"></div>'),
|
||||
|
|
@ -617,7 +617,7 @@ export const MessageUserStore = new class {
|
|||
if (oMessage) {
|
||||
preload || this.hideMessageBodies();
|
||||
preload || this.messageLoading(true);
|
||||
Remote.message((iError, oData, bCached) => {
|
||||
rl.app.Remote.message((iError, oData, bCached) => {
|
||||
if (iError) {
|
||||
if (Notification.RequestAborted !== iError && !preload) {
|
||||
this.message(null);
|
||||
|
|
|
|||
|
|
@ -175,15 +175,15 @@
|
|||
right: 0;
|
||||
}
|
||||
|
||||
.inbox-star-icon {
|
||||
.flag-icon {
|
||||
margin-left: 7px;
|
||||
}
|
||||
.inbox-star-icon::after {
|
||||
.flag-icon::after {
|
||||
content:'☆';
|
||||
opacity: .5;
|
||||
}
|
||||
&.inbox-is-starred {
|
||||
.inbox-star-icon::after {
|
||||
.is-flagged {
|
||||
.flag-icon::after {
|
||||
color: orange;
|
||||
content:'★';
|
||||
opacity: 1;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue