diff options
author | kytwb <412895+kytwb@users.noreply.github.com> | 2021-07-23 10:04:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-23 11:04:43 +0200 |
commit | 012e55ebf87559f2d782e5400fb885df8b80a445 (patch) | |
tree | 1966e58defe2bcd9541ca9a3f4db67a95a6b4249 /src/components/services/content | |
parent | Removed references to 'premium' i18n keys that are no longer used. (diff) | |
download | ferdium-app-012e55ebf87559f2d782e5400fb885df8b80a445.tar.gz ferdium-app-012e55ebf87559f2d782e5400fb885df8b80a445.tar.zst ferdium-app-012e55ebf87559f2d782e5400fb885df8b80a445.zip |
Fix hibernation mode (#1486)
* Use hibernation strategy from settings instead of hardcoded 5 minutes
* Fix conditions with isHibernationEnabled, previously disableHibernation
* Make service hibernation obey global setting
Also refactors hibernation to move some hibernation enablement logic
into the Service model
* Remove global hibernation enable switch
Implements option 4 from
https://github.com/getferdi/ferdi/pull/1486#issuecomment-860290992
according to
https://github.com/getferdi/ferdi/pull/1486#issuecomment-876558694
* Implements #865 : Add 'hibernate service' and 'wake up service' in the sidebar context menu.
* Removed 'hibernationEnabled' check on main settings screen
Since this is an (imo) incongruous behavior for the first time user.
They will see a message, but with no ability to choose the hibernation strategy.
* Autogenerated files from conflict fixes
Co-authored-by: Kristóf Marussy <kristof@marussy.com>
Co-authored-by: Vijay A <avijayr@protonmail.com>
Diffstat (limited to 'src/components/services/content')
-rw-r--r-- | src/components/services/content/ServiceView.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/components/services/content/ServiceView.js b/src/components/services/content/ServiceView.js index 17d2db5a0..3fc084ff0 100644 --- a/src/components/services/content/ServiceView.js +++ b/src/components/services/content/ServiceView.js | |||
@@ -145,19 +145,17 @@ export default @inject('stores', 'actions') @observer class ServiceView extends | |||
145 | </> | 145 | </> |
146 | ) : ( | 146 | ) : ( |
147 | <> | 147 | <> |
148 | {(!service.isHibernating || service.isHibernationEnabled) ? ( | 148 | {!service.isHibernating ? ( |
149 | <> | 149 | <> |
150 | {showNavBar && ( | 150 | {showNavBar && ( |
151 | <WebControlsScreen service={service} /> | 151 | <WebControlsScreen service={service} /> |
152 | )} | 152 | )} |
153 | {!service.isHibernating && ( | 153 | <ServiceWebview |
154 | <ServiceWebview | 154 | service={service} |
155 | service={service} | 155 | setWebviewReference={setWebviewReference} |
156 | setWebviewReference={setWebviewReference} | 156 | detachService={detachService} |
157 | detachService={detachService} | 157 | isSpellcheckerEnabled={isSpellcheckerEnabled} |
158 | isSpellcheckerEnabled={isSpellcheckerEnabled} | 158 | /> |
159 | /> | ||
160 | )} | ||
161 | </> | 159 | </> |
162 | ) : ( | 160 | ) : ( |
163 | <div> | 161 | <div> |