mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
isArray to native Array.isArray
isUnd(*) to native undefined === *
isFunc to native typeof * === 'function'
isObject to native typeof * === 'object'
microtime() to native Date().getTime();
noop to native ()=>{}
noopFalse to native ()=>false
noopTrue to native ()=>true
boolToAjax to native *?'1':'0'
Underscore.js to native
This commit is contained in:
parent
fa39c7ecba
commit
ea48f5060b
72 changed files with 551 additions and 775 deletions
|
|
@ -1,8 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { delegateRunOnDestroy, boolToAjax } from 'Common/Utils';
|
||||
import { delegateRunOnDestroy } from 'Common/Utils';
|
||||
import { Magics } from 'Common/Enums';
|
||||
import { bIsHttps } from 'Common/Globals';
|
||||
|
||||
import PgpStore from 'Stores/User/Pgp';
|
||||
import SettingsStore from 'Stores/User/Settings';
|
||||
|
|
@ -22,8 +21,6 @@ class OpenPgpUserSettings {
|
|||
this.openPgpKeyForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
|
||||
this.allowDraftAutosave = SettingsStore.allowDraftAutosave;
|
||||
|
||||
this.isHttps = bIsHttps;
|
||||
}
|
||||
|
||||
addOpenPgpKey() {
|
||||
|
|
@ -66,7 +63,7 @@ class OpenPgpUserSettings {
|
|||
|
||||
onBuild() {
|
||||
setTimeout(() => {
|
||||
this.allowDraftAutosave.subscribe(Remote.saveSettingsHelper('AllowDraftAutosave', boolToAjax));
|
||||
this.allowDraftAutosave.subscribe(Remote.saveSettingsHelper('AllowDraftAutosave', v=>v?'1':'0'));
|
||||
}, Magics.Time50ms);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue