aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 10:11:12 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 10:11:12 +0200
commit2de13b5161c82e5857edb13d4a971a31b7628f0b (patch)
tree47393875b245ca659e998bb49045e4b82ca8366b /src/stores/ServicesStore.js
parentFix issue with endless data fetching loop when user logs out (diff)
downloadferdium-app-2de13b5161c82e5857edb13d4a971a31b7628f0b.tar.gz
ferdium-app-2de13b5161c82e5857edb13d4a971a31b7628f0b.tar.zst
ferdium-app-2de13b5161c82e5857edb13d4a971a31b7628f0b.zip
Set correct keys for new settings store
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index b96bc506b..6dfc114f5 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -86,13 +86,13 @@ export default class ServicesStore extends Store {
86 } 86 }
87 87
88 @computed get allDisplayed() { 88 @computed get allDisplayed() {
89 return this.stores.settings.all.service.showDisabledServices ? this.all : this.enabled; 89 return this.stores.settings.all.app.showDisabledServices ? this.all : this.enabled;
90 } 90 }
91 91
92 // This is just used to avoid unnecessary rerendering of resource-heavy webviews 92 // This is just used to avoid unnecessary rerendering of resource-heavy webviews
93 @computed get allDisplayedUnordered() { 93 @computed get allDisplayedUnordered() {
94 const services = this.allServicesRequest.execute().result || []; 94 const services = this.allServicesRequest.execute().result || [];
95 return this.stores.settings.all.service.showDisabledServices ? services : services.filter(service => service.isEnabled); 95 return this.stores.settings.all.app.showDisabledServices ? services : services.filter(service => service.isEnabled);
96 } 96 }
97 97
98 @computed get filtered() { 98 @computed get filtered() {
@@ -434,7 +434,7 @@ export default class ServicesStore extends Store {
434 } 434 }
435 435
436 @action _reorder({ oldIndex, newIndex }) { 436 @action _reorder({ oldIndex, newIndex }) {
437 const showDisabledServices = this.stores.settings.all.service.showDisabledServices; 437 const showDisabledServices = this.stores.settings.all.app.showDisabledServices;
438 const oldEnabledSortIndex = showDisabledServices ? oldIndex : this.all.indexOf(this.enabled[oldIndex]); 438 const oldEnabledSortIndex = showDisabledServices ? oldIndex : this.all.indexOf(this.enabled[oldIndex]);
439 const newEnabledSortIndex = showDisabledServices ? newIndex : this.all.indexOf(this.enabled[newIndex]); 439 const newEnabledSortIndex = showDisabledServices ? newIndex : this.all.indexOf(this.enabled[newIndex]);
440 440
@@ -554,7 +554,10 @@ export default class ServicesStore extends Store {
554 554
555 _logoutReaction() { 555 _logoutReaction() {
556 if (!this.stores.user.isLoggedIn) { 556 if (!this.stores.user.isLoggedIn) {
557 this.actions.settings.remove({ key: 'activeService' }); 557 this.actions.settings.remove({
558 type: 'service',
559 key: 'activeService',
560 });
558 this.allServicesRequest.invalidate().reset(); 561 this.allServicesRequest.invalidate().reset();
559 } 562 }
560 } 563 }
@@ -562,7 +565,7 @@ export default class ServicesStore extends Store {
562 _shareSettingsWithServiceProcess() { 565 _shareSettingsWithServiceProcess() {
563 this.actions.service.sendIPCMessageToAllServices({ 566 this.actions.service.sendIPCMessageToAllServices({
564 channel: 'settings-update', 567 channel: 'settings-update',
565 args: this.stores.settings.all, 568 args: this.stores.settings.all.app,
566 }); 569 });
567 } 570 }
568 571