diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-03-14 20:37:31 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-03-14 20:37:31 +0100 |
commit | 82e832c09b2e013d3643e02a8a366cd4f3900b63 (patch) | |
tree | bc2c20dc7f435497edbc417fc51c0fb845c1c167 /src/stores | |
parent | feat(Mac): Add dock bounce when new update is available (diff) | |
download | ferdium-app-82e832c09b2e013d3643e02a8a366cd4f3900b63.tar.gz ferdium-app-82e832c09b2e013d3643e02a8a366cd4f3900b63.tar.zst ferdium-app-82e832c09b2e013d3643e02a8a366cd4f3900b63.zip |
feat(Services): Improve performance when reordering services
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/ServicesStore.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index c38d0d9ee..c2dbff55d 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -87,6 +87,12 @@ export default class ServicesStore extends Store { | |||
87 | return this.stores.settings.all.showDisabledServices ? this.all : this.enabled; | 87 | return this.stores.settings.all.showDisabledServices ? this.all : this.enabled; |
88 | } | 88 | } |
89 | 89 | ||
90 | // This is just used to avoid unnecessary rerendering of resource-heavy webviews | ||
91 | @computed get allDisplayedUnordered() { | ||
92 | const services = this.allServicesRequest.execute().result || []; | ||
93 | return this.stores.settings.all.showDisabledServices ? services : services.filter(service => service.isEnabled); | ||
94 | } | ||
95 | |||
90 | @computed get filtered() { | 96 | @computed get filtered() { |
91 | return this.all.filter(service => service.name.toLowerCase().includes(this.filterNeedle.toLowerCase())); | 97 | return this.all.filter(service => service.name.toLowerCase().includes(this.filterNeedle.toLowerCase())); |
92 | } | 98 | } |