aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/AppStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-02-15 17:38:13 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-02-15 17:38:13 +0100
commit9a89ef51cded72d5e6d378211e8a74964cfc8cc2 (patch)
treeee4c0d7913119d52b266f66f46d99ee9ef3b9ed8 /src/stores/AppStore.js
parentreplace localStorage with mobx-localstorage (diff)
downloadferdium-app-9a89ef51cded72d5e6d378211e8a74964cfc8cc2.tar.gz
ferdium-app-9a89ef51cded72d5e6d378211e8a74964cfc8cc2.tar.zst
ferdium-app-9a89ef51cded72d5e6d378211e8a74964cfc8cc2.zip
Replace localAPI requests with mobx-localstorage
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r--src/stores/AppStore.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 06c43f83f..77027f88d 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -331,10 +331,7 @@ export default class AppStore extends Store {
331 } 331 }
332 332
333 // Helpers 333 // Helpers
334 async _appStartsCounter() { 334 _appStartsCounter() {
335 // we need to wait until the settings request is resolved
336 await this.stores.settings.allSettingsRequest;
337
338 this.actions.settings.update({ 335 this.actions.settings.update({
339 settings: { 336 settings: {
340 appStarts: (this.stores.settings.all.appStarts || 0) + 1, 337 appStarts: (this.stores.settings.all.appStarts || 0) + 1,
@@ -345,10 +342,10 @@ export default class AppStore extends Store {
345 async _autoStart() { 342 async _autoStart() {
346 this.autoLaunchOnStart = await this._checkAutoStart(); 343 this.autoLaunchOnStart = await this._checkAutoStart();
347 344
348 // we need to wait until the settings request is resolved 345 console.log('### settings appstarts', this.stores.settings.all.appStarts);
349 await this.stores.settings.allSettingsRequest;
350 346
351 if (!this.stores.settings.all.appStarts) { 347 if (!this.stores.settings.all.appStarts) {
348 console.log('launch Franz on start');
352 this.actions.app.launchOnStartup({ 349 this.actions.app.launchOnStartup({
353 enable: true, 350 enable: true,
354 }); 351 });