mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
FolderFullNameRaw is gone due to UTF8
This commit is contained in:
parent
f743f0e27a
commit
d33ec54c1c
14 changed files with 181 additions and 184 deletions
|
|
@ -27,9 +27,9 @@ ContactUserStore.sync = fResultFunc => {
|
|||
&& !ContactUserStore.syncing()
|
||||
) {
|
||||
ContactUserStore.syncing(true);
|
||||
Remote.contactsSync((sResult, oData) => {
|
||||
Remote.contactsSync((iError, oData) => {
|
||||
ContactUserStore.syncing(false);
|
||||
fResultFunc && fResultFunc(sResult, oData);
|
||||
fResultFunc && fResultFunc(iError, oData);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -44,8 +44,7 @@ ContactUserStore.init = () => {
|
|||
ContactUserStore.syncPass(SettingsGet('ContactsSyncPassword'));
|
||||
setTimeout(ContactUserStore.sync, 10000);
|
||||
value = pInt(SettingsGet('ContactsSyncInterval'));
|
||||
value = 5 <= value ? value : 20;
|
||||
value = 320 >= value ? value : 320;
|
||||
value = 5 <= value ? (320 >= value ? value : 320) : 20;
|
||||
setInterval(ContactUserStore.sync, value * 60000 + 5000);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ export const FolderUserStore = new class {
|
|||
|
||||
draftFolderNotEnabled: () => !self.draftFolder() || UNUSED_OPTION_VALUE === self.draftFolder(),
|
||||
|
||||
currentFolderFullNameRaw: () => (self.currentFolder() ? self.currentFolder().fullName : ''),
|
||||
|
||||
currentFolderFullName: () => (self.currentFolder() ? self.currentFolder().fullName : ''),
|
||||
currentFolderFullNameHash: () => (self.currentFolder() ? self.currentFolder().fullNameHash : ''),
|
||||
|
||||
|
|
|
|||
|
|
@ -267,12 +267,12 @@ export const MessageUserStore = new class {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {string} fromFolderFullNameRaw
|
||||
* @param {string} fromFolderFullName
|
||||
* @param {Array} uidForRemove
|
||||
* @param {string=} toFolderFullNameRaw = ''
|
||||
* @param {string=} toFolderFullName = ''
|
||||
* @param {boolean=} copy = false
|
||||
*/
|
||||
removeMessagesFromList(fromFolderFullNameRaw, uidForRemove, toFolderFullNameRaw = '', copy = false) {
|
||||
removeMessagesFromList(fromFolderFullName, uidForRemove, toFolderFullName = '', copy = false) {
|
||||
uidForRemove = uidForRemove.map(mValue => pInt(mValue));
|
||||
|
||||
let unseenCount = 0,
|
||||
|
|
@ -281,11 +281,10 @@ export const MessageUserStore = new class {
|
|||
|
||||
const trashFolder = FolderUserStore.trashFolder(),
|
||||
spamFolder = FolderUserStore.spamFolder(),
|
||||
fromFolder = getFolderFromCacheList(fromFolderFullNameRaw),
|
||||
toFolder = toFolderFullNameRaw ? getFolderFromCacheList(toFolderFullNameRaw) : null,
|
||||
currentFolderFullNameRaw = FolderUserStore.currentFolderFullNameRaw(),
|
||||
fromFolder = getFolderFromCacheList(fromFolderFullName),
|
||||
toFolder = toFolderFullName ? getFolderFromCacheList(toFolderFullName) : null,
|
||||
messages =
|
||||
currentFolderFullNameRaw === fromFolderFullNameRaw
|
||||
FolderUserStore.currentFolderFullName() === fromFolderFullName
|
||||
? messageList.filter(item => item && uidForRemove.includes(pInt(item.uid)))
|
||||
: [];
|
||||
|
||||
|
|
@ -339,12 +338,12 @@ export const MessageUserStore = new class {
|
|||
}
|
||||
}
|
||||
|
||||
if (fromFolderFullNameRaw) {
|
||||
setFolderHash(fromFolderFullNameRaw, '');
|
||||
if (fromFolderFullName) {
|
||||
setFolderHash(fromFolderFullName, '');
|
||||
}
|
||||
|
||||
if (toFolderFullNameRaw) {
|
||||
setFolderHash(toFolderFullNameRaw, '');
|
||||
if (toFolderFullName) {
|
||||
setFolderHash(toFolderFullName, '');
|
||||
}
|
||||
|
||||
if (this.listThreadUid()) {
|
||||
|
|
@ -635,7 +634,7 @@ export const MessageUserStore = new class {
|
|||
* @returns {string}
|
||||
*/
|
||||
calculateMessageListHash(list) {
|
||||
return list.map(message => '' + message.hash + '_' + message.threadsLen() + '_' + message.flagHash()).join(
|
||||
return list.map(message => message.hash + '_' + message.threadsLen() + '_' + message.flagHash()).join(
|
||||
'|'
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { SMAudio } from 'Common/Audio';
|
||||
import * as Links from 'Common/Links';
|
||||
import { addObservablesTo } from 'Common/Utils';
|
||||
|
||||
/**
|
||||
* Might not work due to the new ServiceWorkerRegistration.showNotification
|
||||
|
|
@ -36,11 +35,13 @@ if (WorkerNotifications && ServiceWorkerRegistration && ServiceWorkerRegistratio
|
|||
|
||||
export const NotificationUserStore = new class {
|
||||
constructor() {
|
||||
this.enableSoundNotification = ko.observable(false);
|
||||
addObservablesTo(this, {
|
||||
enableSoundNotification: false,
|
||||
|
||||
this.enableDesktopNotification = ko.observable(false)/*.extend({ notify: 'always' })*/;
|
||||
enableDesktopNotification: false,/*.extend({ notify: 'always' })*/
|
||||
|
||||
this.isDesktopNotificationAllowed = ko.observable(!NotificationsDenied());
|
||||
isDesktopNotificationAllowed: !NotificationsDenied()
|
||||
});
|
||||
|
||||
this.enableDesktopNotification.subscribe(value => {
|
||||
DesktopNotifications = !!value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue