mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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() {
|
setRecipients() {
|
||||||
this.actionValueFourth(AccountStore.accountsEmails().join(', '));
|
this.actionValueFourth(AccountStore.getEmailAddresses().join(', '));
|
||||||
}
|
}
|
||||||
|
|
||||||
parse(json) {
|
parse(json) {
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class AccountsUserSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
accountsAndIdentitiesAfterMove() {
|
accountsAndIdentitiesAfterMove() {
|
||||||
Remote.accountsAndIdentitiesSortOrder(null, AccountStore.accountsEmails.peek(), IdentityStore.identitiesIDS.peek());
|
Remote.accountsAndIdentitiesSortOrder(null, AccountStore.getEmailAddresses(), IdentityStore.getIDS());
|
||||||
}
|
}
|
||||||
|
|
||||||
onBuild(oDom) {
|
onBuild(oDom) {
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,7 @@ class AccountUserStore {
|
||||||
this.accounts = ko.observableArray([]);
|
this.accounts = ko.observableArray([]);
|
||||||
this.accounts.loading = ko.observable(false).extend({ throttle: 100 });
|
this.accounts.loading = ko.observable(false).extend({ throttle: 100 });
|
||||||
|
|
||||||
this.computers();
|
this.getEmailAddresses = () => this.accounts().map(item => item ? item.email : null).filter(value => !!value);
|
||||||
}
|
|
||||||
|
|
||||||
computers() {
|
|
||||||
this.accountsEmails = ko.computed(
|
|
||||||
() => this.accounts().map(item => (item ? item.email : null)).filter(value => !!value)
|
|
||||||
);
|
|
||||||
|
|
||||||
this.accountsUnreadCount = ko.computed(() => 0);
|
this.accountsUnreadCount = ko.computed(() => 0);
|
||||||
// this.accountsUnreadCount = ko.computed(() => {
|
// this.accountsUnreadCount = ko.computed(() => {
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,6 @@ class FolderUserStore {
|
||||||
|
|
||||||
this.sieveAllowFileintoInbox = !!rl.settings.get('SieveAllowFileintoInbox');
|
this.sieveAllowFileintoInbox = !!rl.settings.get('SieveAllowFileintoInbox');
|
||||||
|
|
||||||
this.computers();
|
|
||||||
this.subscribers();
|
|
||||||
}
|
|
||||||
|
|
||||||
computers() {
|
|
||||||
this.draftFolderNotEnabled = ko.computed(
|
this.draftFolderNotEnabled = ko.computed(
|
||||||
() => !this.draftFolder() || UNUSED_OPTION_VALUE === this.draftFolder()
|
() => !this.draftFolder() || UNUSED_OPTION_VALUE === this.draftFolder()
|
||||||
);
|
);
|
||||||
|
|
@ -118,6 +113,8 @@ class FolderUserStore {
|
||||||
(item) => (item ? item.localName() : '')
|
(item) => (item ? item.localName() : '')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.subscribers();
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribers() {
|
subscribers() {
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,7 @@ class IdentityUserStore {
|
||||||
this.identities = ko.observableArray([]);
|
this.identities = ko.observableArray([]);
|
||||||
this.identities.loading = ko.observable(false).extend({ throttle: 100 });
|
this.identities.loading = ko.observable(false).extend({ throttle: 100 });
|
||||||
|
|
||||||
this.identitiesIDS = ko.computed(
|
this.getIDS = () => this.identities().map(item => (item ? item.id() : null)).filter(value => null !== value);
|
||||||
() => this.identities().map(item => (item ? item.id : null)).filter(value => !!value)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,15 +95,6 @@ class MessageUserStore {
|
||||||
this.messagesBodiesDom = ko.observable(null);
|
this.messagesBodiesDom = ko.observable(null);
|
||||||
this.messageActiveDom = 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.messageLoading = ko.computed(() => this.messageCurrentLoading());
|
||||||
|
|
||||||
this.messageListEndHash = ko.computed(
|
this.messageListEndHash = ko.computed(
|
||||||
|
|
@ -171,6 +162,12 @@ class MessageUserStore {
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.subscribers();
|
||||||
|
|
||||||
|
this.onMessageResponse = this.onMessageResponse.bind(this);
|
||||||
|
|
||||||
|
this.purgeMessageBodyCacheThrottle = this.purgeMessageBodyCache.throttle(30000);
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribers() {
|
subscribers() {
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,6 @@ class NotificationUserStore {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.computers();
|
|
||||||
|
|
||||||
this.initNotificationPlayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
computers() {
|
|
||||||
this.isDesktopNotificationSupported = ko.computed(
|
this.isDesktopNotificationSupported = ko.computed(
|
||||||
() => DesktopNotification.NotSupported !== this.desktopNotificationPermissions()
|
() => DesktopNotification.NotSupported !== this.desktopNotificationPermissions()
|
||||||
);
|
);
|
||||||
|
|
@ -99,6 +93,8 @@ class NotificationUserStore {
|
||||||
DesktopNotification.NotSupported === this.desktopNotificationPermissions() ||
|
DesktopNotification.NotSupported === this.desktopNotificationPermissions() ||
|
||||||
DesktopNotification.Denied === this.desktopNotificationPermissions()
|
DesktopNotification.Denied === this.desktopNotificationPermissions()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.initNotificationPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
initNotificationPlayer() {
|
initNotificationPlayer() {
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,9 @@ class SettingsUserStore {
|
||||||
|
|
||||||
this.autoLogout = ko.observable(30);
|
this.autoLogout = ko.observable(30);
|
||||||
|
|
||||||
this.computers();
|
|
||||||
this.subscribers();
|
|
||||||
}
|
|
||||||
|
|
||||||
computers() {
|
|
||||||
this.usePreviewPane = ko.computed(() => Layout.NoPreview !== this.layout());
|
this.usePreviewPane = ko.computed(() => Layout.NoPreview !== this.layout());
|
||||||
|
|
||||||
|
this.subscribers();
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribers() {
|
subscribers() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue