diff options
Diffstat (limited to 'src/stores/SettingsStore.ts')
-rw-r--r-- | src/stores/SettingsStore.ts | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/stores/SettingsStore.ts b/src/stores/SettingsStore.ts index 5ca499160..90cd82690 100644 --- a/src/stores/SettingsStore.ts +++ b/src/stores/SettingsStore.ts | |||
@@ -70,14 +70,17 @@ export default class SettingsStore extends TypedStore { | |||
70 | this.all.app.lockingFeatureEnabled && | 70 | this.all.app.lockingFeatureEnabled && |
71 | this.all.app.inactivityLock !== 0 | 71 | this.all.app.inactivityLock !== 0 |
72 | ) { | 72 | ) { |
73 | inactivityTimer = setTimeout(() => { | 73 | inactivityTimer = setTimeout( |
74 | this.actions.settings.update({ | 74 | () => { |
75 | type: 'app', | 75 | this.actions.settings.update({ |
76 | data: { | 76 | type: 'app', |
77 | locked: true, | 77 | data: { |
78 | }, | 78 | locked: true, |
79 | }); | 79 | }, |
80 | }, this.all.app.inactivityLock * 1000 * 60); | 80 | }); |
81 | }, | ||
82 | this.all.app.inactivityLock * 1000 * 60, | ||
83 | ); | ||
81 | } | 84 | } |
82 | }); | 85 | }); |
83 | getCurrentWindow().on('focus', () => { | 86 | getCurrentWindow().on('focus', () => { |
@@ -176,6 +179,7 @@ export default class SettingsStore extends TypedStore { | |||
176 | 179 | ||
177 | const appSettings = this.all[type]; | 180 | const appSettings = this.all[type]; |
178 | if (Object.hasOwnProperty.call(appSettings, key)) { | 181 | if (Object.hasOwnProperty.call(appSettings, key)) { |
182 | // eslint-disable-next-line @typescript-eslint/no-dynamic-delete | ||
179 | delete appSettings[key]; | 183 | delete appSettings[key]; |
180 | 184 | ||
181 | this.actions.settings.update({ | 185 | this.actions.settings.update({ |
@@ -185,6 +189,7 @@ export default class SettingsStore extends TypedStore { | |||
185 | } | 189 | } |
186 | } | 190 | } |
187 | 191 | ||
192 | // eslint-disable-next-line @typescript-eslint/ban-types | ||
188 | _ensureMigrationAndMarkDone(migrationName: string, callback: Function): void { | 193 | _ensureMigrationAndMarkDone(migrationName: string, callback: Function): void { |
189 | if (!this.all.migration[migrationName]) { | 194 | if (!this.all.migration[migrationName]) { |
190 | callback(); | 195 | callback(); |