diff options
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 88b0331bf..d04fdd0c5 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -12,6 +12,7 @@ import Request from './lib/Request'; | |||
12 | import CachedRequest from './lib/CachedRequest'; | 12 | import CachedRequest from './lib/CachedRequest'; |
13 | import { matchRoute } from '../helpers/routing-helpers'; | 13 | import { matchRoute } from '../helpers/routing-helpers'; |
14 | import { gaEvent } from '../lib/analytics'; | 14 | import { gaEvent } from '../lib/analytics'; |
15 | import { workspaceStore } from '../features/workspaces'; | ||
15 | 16 | ||
16 | const debug = require('debug')('Franz:ServiceStore'); | 17 | const debug = require('debug')('Franz:ServiceStore'); |
17 | 18 | ||
@@ -100,7 +101,6 @@ export default class ServicesStore extends Store { | |||
100 | return observable(services.slice().slice().sort((a, b) => a.order - b.order)); | 101 | return observable(services.slice().slice().sort((a, b) => a.order - b.order)); |
101 | } | 102 | } |
102 | } | 103 | } |
103 | |||
104 | return []; | 104 | return []; |
105 | } | 105 | } |
106 | 106 | ||
@@ -109,13 +109,16 @@ export default class ServicesStore extends Store { | |||
109 | } | 109 | } |
110 | 110 | ||
111 | @computed get allDisplayed() { | 111 | @computed get allDisplayed() { |
112 | return this.stores.settings.all.app.showDisabledServices ? this.all : this.enabled; | 112 | const services = this.stores.settings.all.app.showDisabledServices ? this.all : this.enabled; |
113 | return workspaceStore.filterServicesByActiveWorkspace(services); | ||
113 | } | 114 | } |
114 | 115 | ||
115 | // This is just used to avoid unnecessary rerendering of resource-heavy webviews | 116 | // This is just used to avoid unnecessary rerendering of resource-heavy webviews |
116 | @computed get allDisplayedUnordered() { | 117 | @computed get allDisplayedUnordered() { |
118 | const { showDisabledServices } = this.stores.settings.all.app; | ||
117 | const services = this.allServicesRequest.execute().result || []; | 119 | const services = this.allServicesRequest.execute().result || []; |
118 | return this.stores.settings.all.app.showDisabledServices ? services : services.filter(service => service.isEnabled); | 120 | const filteredServices = showDisabledServices ? services : services.filter(service => service.isEnabled); |
121 | return workspaceStore.filterServicesByActiveWorkspace(filteredServices); | ||
119 | } | 122 | } |
120 | 123 | ||
121 | @computed get filtered() { | 124 | @computed get filtered() { |