mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Underscore.js _.delay() to native setTimeout()
This commit is contained in:
parent
a82575a830
commit
43c92a82e6
29 changed files with 67 additions and 82 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import _ from '_';
|
||||
import ko from 'ko';
|
||||
|
||||
import { MESSAGES_PER_PAGE_VALUES } from 'Common/Consts';
|
||||
|
|
@ -96,13 +95,13 @@ class GeneralUserSettings {
|
|||
}
|
||||
|
||||
onBuild() {
|
||||
_.delay(() => {
|
||||
setTimeout(() => {
|
||||
const f0 = settingsSaveHelperSimpleFunction(this.editorDefaultTypeTrigger, this),
|
||||
f1 = settingsSaveHelperSimpleFunction(this.mppTrigger, this),
|
||||
f2 = settingsSaveHelperSimpleFunction(this.layoutTrigger, this),
|
||||
fReloadLanguageHelper = (saveSettingsStep) => () => {
|
||||
this.languageTrigger(saveSettingsStep);
|
||||
_.delay(() => this.languageTrigger(SaveSettingsStep.Idle), Magics.Time1s);
|
||||
setTimeout(() => this.languageTrigger(SaveSettingsStep.Idle), Magics.Time1s);
|
||||
};
|
||||
|
||||
this.language.subscribe((value) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import _ from '_';
|
||||
import ko from 'ko';
|
||||
|
||||
import { delegateRunOnDestroy, boolToAjax } from 'Common/Utils';
|
||||
|
|
@ -66,7 +65,7 @@ class OpenPgpUserSettings {
|
|||
}
|
||||
|
||||
onBuild() {
|
||||
_.delay(() => {
|
||||
setTimeout(() => {
|
||||
this.allowDraftAutosave.subscribe(Remote.saveSettingsHelper('AllowDraftAutosave', boolToAjax));
|
||||
}, Magics.Time50ms);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import _ from '_';
|
||||
import ko from 'ko';
|
||||
|
||||
import { pInt, settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
||||
|
|
@ -42,7 +41,7 @@ class SecurityUserSettings {
|
|||
|
||||
onBuild() {
|
||||
if (this.capaAutoLogout) {
|
||||
_.delay(() => {
|
||||
setTimeout(() => {
|
||||
const f0 = settingsSaveHelperSimpleFunction(this.autoLogout.trigger, this);
|
||||
|
||||
this.autoLogout.subscribe(Remote.saveSettingsHelper('AutoLogout', pInt, f0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue