From 9a89ef51cded72d5e6d378211e8a74964cfc8cc2 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 15 Feb 2018 17:38:13 +0100 Subject: Replace localAPI requests with mobx-localstorage --- src/stores/AppStore.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/stores/AppStore.js') 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 { } // Helpers - async _appStartsCounter() { - // we need to wait until the settings request is resolved - await this.stores.settings.allSettingsRequest; - + _appStartsCounter() { this.actions.settings.update({ settings: { appStarts: (this.stores.settings.all.appStarts || 0) + 1, @@ -345,10 +342,10 @@ export default class AppStore extends Store { async _autoStart() { this.autoLaunchOnStart = await this._checkAutoStart(); - // we need to wait until the settings request is resolved - await this.stores.settings.allSettingsRequest; + console.log('### settings appstarts', this.stores.settings.all.appStarts); if (!this.stores.settings.all.appStarts) { + console.log('launch Franz on start'); this.actions.app.launchOnStartup({ enable: true, }); -- cgit v1.2.3-70-g09d2 From 2daa9b7226c8b7b96ed2634627391b8a8fe171ac Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 15 Feb 2018 20:06:15 +0100 Subject: remove debug logs --- src/stores/AppStore.js | 3 --- src/stores/ServicesStore.js | 1 - 2 files changed, 4 deletions(-) (limited to 'src/stores/AppStore.js') diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 77027f88d..9f3749b34 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -342,10 +342,7 @@ export default class AppStore extends Store { async _autoStart() { this.autoLaunchOnStart = await this._checkAutoStart(); - console.log('### settings appstarts', this.stores.settings.all.appStarts); - if (!this.stores.settings.all.appStarts) { - console.log('launch Franz on start'); this.actions.app.launchOnStartup({ enable: true, }); diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 99ffe5439..c38d0d9ee 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js @@ -536,7 +536,6 @@ export default class ServicesStore extends Store { // We can't just block this earlier, otherwise the mobx reaction won't be aware of the vars to watch in some cases if (showMessageBadgesEvenWhenMuted) { - console.log('set badge', unreadDirectMessageCount, unreadIndirectMessageCount); this.actions.app.setBadge({ unreadDirectMessageCount, unreadIndirectMessageCount, -- cgit v1.2.3-70-g09d2 From de9b92876ff53bc5d2a2c7c589a27b741fb832b9 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 16 Feb 2018 14:06:25 +0100 Subject: fix sideeffect of app not launching itself after first launch --- src/stores/AppStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stores/AppStore.js') diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 9f3749b34..22a396033 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -342,7 +342,7 @@ export default class AppStore extends Store { async _autoStart() { this.autoLaunchOnStart = await this._checkAutoStart(); - if (!this.stores.settings.all.appStarts) { + if (this.stores.settings.all.appStarts === 1) { this.actions.app.launchOnStartup({ enable: true, }); -- cgit v1.2.3-70-g09d2