mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 04:22:15 +08:00
This commit is contained in:
parent
d291716489
commit
4257d9ca78
8 changed files with 16 additions and 37 deletions
|
@ -211,7 +211,7 @@ class FilterModel extends AbstractModel {
|
|||
}
|
||||
|
||||
setRecipients() {
|
||||
this.actionValueFourth(AccountStore.accountsEmails().join(', '));
|
||||
this.actionValueFourth(AccountStore.getEmailAddresses().join(', '));
|
||||
}
|
||||
|
||||
parse(json) {
|
||||
|
|
|
@ -79,7 +79,7 @@ class AccountsUserSettings {
|
|||
}
|
||||
|
||||
accountsAndIdentitiesAfterMove() {
|
||||
Remote.accountsAndIdentitiesSortOrder(null, AccountStore.accountsEmails.peek(), IdentityStore.identitiesIDS.peek());
|
||||
Remote.accountsAndIdentitiesSortOrder(null, AccountStore.getEmailAddresses(), IdentityStore.getIDS());
|
||||
}
|
||||
|
||||
onBuild(oDom) {
|
||||
|
|
|
@ -10,13 +10,7 @@ class AccountUserStore {
|
|||
this.accounts = ko.observableArray([]);
|
||||
this.accounts.loading = ko.observable(false).extend({ throttle: 100 });
|
||||
|
||||
this.computers();
|
||||
}
|
||||
|
||||
computers() {
|
||||
this.accountsEmails = ko.computed(
|
||||
() => this.accounts().map(item => (item ? item.email : null)).filter(value => !!value)
|
||||
);
|
||||
this.getEmailAddresses = () => this.accounts().map(item => item ? item.email : null).filter(value => !!value);
|
||||
|
||||
this.accountsUnreadCount = ko.computed(() => 0);
|
||||
// this.accountsUnreadCount = ko.computed(() => {
|
||||
|
|
|
@ -32,11 +32,6 @@ class FolderUserStore {
|
|||
|
||||
this.sieveAllowFileintoInbox = !!rl.settings.get('SieveAllowFileintoInbox');
|
||||
|
||||
this.computers();
|
||||
this.subscribers();
|
||||
}
|
||||
|
||||
computers() {
|
||||
this.draftFolderNotEnabled = ko.computed(
|
||||
() => !this.draftFolder() || UNUSED_OPTION_VALUE === this.draftFolder()
|
||||
);
|
||||
|
@ -118,6 +113,8 @@ class FolderUserStore {
|
|||
(item) => (item ? item.localName() : '')
|
||||
)
|
||||
);
|
||||
|
||||
this.subscribers();
|
||||
}
|
||||
|
||||
subscribers() {
|
||||
|
|
|
@ -5,9 +5,7 @@ class IdentityUserStore {
|
|||
this.identities = ko.observableArray([]);
|
||||
this.identities.loading = ko.observable(false).extend({ throttle: 100 });
|
||||
|
||||
this.identitiesIDS = ko.computed(
|
||||
() => this.identities().map(item => (item ? item.id : null)).filter(value => !!value)
|
||||
);
|
||||
this.getIDS = () => this.identities().map(item => (item ? item.id() : null)).filter(value => null !== value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,15 +95,6 @@ class MessageUserStore {
|
|||
this.messagesBodiesDom = ko.observable(null);
|
||||
this.messageActiveDom = ko.observable(null);
|
||||
|
||||
this.computers();
|
||||
this.subscribers();
|
||||
|
||||
this.onMessageResponse = this.onMessageResponse.bind(this);
|
||||
|
||||
this.purgeMessageBodyCacheThrottle = this.purgeMessageBodyCache.throttle(30000);
|
||||
}
|
||||
|
||||
computers() {
|
||||
this.messageLoading = ko.computed(() => this.messageCurrentLoading());
|
||||
|
||||
this.messageListEndHash = ko.computed(
|
||||
|
@ -171,6 +162,12 @@ class MessageUserStore {
|
|||
});
|
||||
return result;
|
||||
});
|
||||
|
||||
this.subscribers();
|
||||
|
||||
this.onMessageResponse = this.onMessageResponse.bind(this);
|
||||
|
||||
this.purgeMessageBodyCacheThrottle = this.purgeMessageBodyCache.throttle(30000);
|
||||
}
|
||||
|
||||
subscribers() {
|
||||
|
|
|
@ -84,12 +84,6 @@ class NotificationUserStore {
|
|||
};
|
||||
}
|
||||
|
||||
this.computers();
|
||||
|
||||
this.initNotificationPlayer();
|
||||
}
|
||||
|
||||
computers() {
|
||||
this.isDesktopNotificationSupported = ko.computed(
|
||||
() => DesktopNotification.NotSupported !== this.desktopNotificationPermissions()
|
||||
);
|
||||
|
@ -99,6 +93,8 @@ class NotificationUserStore {
|
|||
DesktopNotification.NotSupported === this.desktopNotificationPermissions() ||
|
||||
DesktopNotification.Denied === this.desktopNotificationPermissions()
|
||||
);
|
||||
|
||||
this.initNotificationPlayer();
|
||||
}
|
||||
|
||||
initNotificationPlayer() {
|
||||
|
|
|
@ -31,12 +31,9 @@ class SettingsUserStore {
|
|||
|
||||
this.autoLogout = ko.observable(30);
|
||||
|
||||
this.computers();
|
||||
this.subscribers();
|
||||
}
|
||||
|
||||
computers() {
|
||||
this.usePreviewPane = ko.computed(() => Layout.NoPreview !== this.layout());
|
||||
|
||||
this.subscribers();
|
||||
}
|
||||
|
||||
subscribers() {
|
||||
|
|
Loading…
Reference in a new issue