aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/Service.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/Service.js')
-rw-r--r--src/models/Service.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/models/Service.js b/src/models/Service.js
index dc8febe0b..2f2b4572d 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -139,6 +139,17 @@ export default class Service {
139 139
140 this.recipe = recipe; 140 this.recipe = recipe;
141 141
142 // Check if "Hibernate on Startup" is enabled and hibernate all services except active one
143 const {
144 hibernate,
145 hibernateOnStartup,
146 } = window.ferdi.stores.settings.app;
147 // The service store is probably not loaded yet so we need to use localStorage data to get active service
148 const isActive = window.localStorage.service && JSON.parse(window.localStorage.service).activeService === this.id;
149 if (hibernate && hibernateOnStartup && !isActive) {
150 this.isHibernating = true;
151 }
152
142 autorun(() => { 153 autorun(() => {
143 if (!this.isEnabled) { 154 if (!this.isEnabled) {
144 this.webview = null; 155 this.webview = null;