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 c63bef196..da4b19c0d 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 { filterServicesByActiveWorkspace, getActiveWorkspaceServices } from '../features/workspaces'; | ||
15 | 16 | ||
16 | const debug = require('debug')('Franz:ServiceStore'); | 17 | const debug = require('debug')('Franz:ServiceStore'); |
17 | 18 | ||
@@ -98,7 +99,6 @@ export default class ServicesStore extends Store { | |||
98 | return observable(services.slice().slice().sort((a, b) => a.order - b.order)); | 99 | return observable(services.slice().slice().sort((a, b) => a.order - b.order)); |
99 | } | 100 | } |
100 | } | 101 | } |
101 | |||
102 | return []; | 102 | return []; |
103 | } | 103 | } |
104 | 104 | ||
@@ -107,13 +107,16 @@ export default class ServicesStore extends Store { | |||
107 | } | 107 | } |
108 | 108 | ||
109 | @computed get allDisplayed() { | 109 | @computed get allDisplayed() { |
110 | return this.stores.settings.all.app.showDisabledServices ? this.all : this.enabled; | 110 | const services = this.stores.settings.all.app.showDisabledServices ? this.all : this.enabled; |
111 | return filterServicesByActiveWorkspace(services); | ||
111 | } | 112 | } |
112 | 113 | ||
113 | // This is just used to avoid unnecessary rerendering of resource-heavy webviews | 114 | // This is just used to avoid unnecessary rerendering of resource-heavy webviews |
114 | @computed get allDisplayedUnordered() { | 115 | @computed get allDisplayedUnordered() { |
116 | const { showDisabledServices } = this.stores.settings.all.app; | ||
115 | const services = this.allServicesRequest.execute().result || []; | 117 | const services = this.allServicesRequest.execute().result || []; |
116 | return this.stores.settings.all.app.showDisabledServices ? services : services.filter(service => service.isEnabled); | 118 | const filteredServices = showDisabledServices ? services : services.filter(service => service.isEnabled); |
119 | return getActiveWorkspaceServices(filteredServices); | ||
117 | } | 120 | } |
118 | 121 | ||
119 | @computed get filtered() { | 122 | @computed get filtered() { |