aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar André Oliveira <oliveira.andrerodrigues95@gmail.com>2022-07-19 10:47:44 +0100
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-07-19 17:21:31 +0530
commit3a2492178fcbc84eac33a9f0105f88c910c721e7 (patch)
tree58fee324f24c02ddb013d33d92ebd3bf724ad9ad /src
parent6.0.0-nightly.102 [skip ci] (diff)
downloadferdium-app-3a2492178fcbc84eac33a9f0105f88c910c721e7.tar.gz
ferdium-app-3a2492178fcbc84eac33a9f0105f88c910c721e7.tar.zst
ferdium-app-3a2492178fcbc84eac33a9f0105f88c910c721e7.zip
fix: remove autoHibernate
This was causing issues to the service hibernation. Toggling back the isHibernationEnabled to false right after saving the service, which disabled the Hibernation.
Diffstat (limited to 'src')
-rw-r--r--src/config.ts1
-rw-r--r--src/containers/settings/EditServiceScreen.tsx7
-rw-r--r--src/models/Recipe.ts9
3 files changed, 1 insertions, 16 deletions
diff --git a/src/config.ts b/src/config.ts
index f872f31aa..150b7101d 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -300,5 +300,4 @@ export const DEFAULT_SERVICE_SETTINGS = {
300 hasHostedOption: false, 300 hasHostedOption: false,
301 allowFavoritesDelineationInUnreadCount: false, 301 allowFavoritesDelineationInUnreadCount: false,
302 disablewebsecurity: false, 302 disablewebsecurity: false,
303 autoHibernate: false,
304}; 303};
diff --git a/src/containers/settings/EditServiceScreen.tsx b/src/containers/settings/EditServiceScreen.tsx
index ba8f374c3..0c7e3aa07 100644
--- a/src/containers/settings/EditServiceScreen.tsx
+++ b/src/containers/settings/EditServiceScreen.tsx
@@ -153,8 +153,6 @@ class EditServiceScreen extends Component<EditServicesScreenProps> {
153 153
154 const { stores } = this.props; 154 const { stores } = this.props;
155 155
156 const { action } = stores.router.pathValue;
157
158 let defaultSpellcheckerLanguage = 156 let defaultSpellcheckerLanguage =
159 SPELLCHECKER_LOCALES[stores.settings.app.spellcheckerLanguage]; 157 SPELLCHECKER_LOCALES[stores.settings.app.spellcheckerLanguage];
160 158
@@ -190,10 +188,7 @@ class EditServiceScreen extends Component<EditServicesScreenProps> {
190 }, 188 },
191 isHibernationEnabled: { 189 isHibernationEnabled: {
192 label: intl.formatMessage(messages.enableHibernation), 190 label: intl.formatMessage(messages.enableHibernation),
193 value: 191 value: service?.isHibernationEnabled,
194 action !== 'edit'
195 ? recipe.autoHibernate
196 : service?.isHibernationEnabled,
197 default: DEFAULT_SERVICE_SETTINGS.isHibernationEnabled, 192 default: DEFAULT_SERVICE_SETTINGS.isHibernationEnabled,
198 }, 193 },
199 isWakeUpEnabled: { 194 isWakeUpEnabled: {
diff --git a/src/models/Recipe.ts b/src/models/Recipe.ts
index a171a288a..6911f7301 100644
--- a/src/models/Recipe.ts
+++ b/src/models/Recipe.ts
@@ -21,7 +21,6 @@ interface RecipeData {
21 urlInputPrefix?: string; 21 urlInputPrefix?: string;
22 urlInputSuffix?: string; 22 urlInputSuffix?: string;
23 disablewebsecurity?: boolean; 23 disablewebsecurity?: boolean;
24 autoHibernate?: boolean;
25 partition?: string; 24 partition?: string;
26 local?: boolean; 25 local?: boolean;
27 message?: string; 26 message?: string;
@@ -47,7 +46,6 @@ export interface IRecipe {
47 message: string; 46 message: string;
48 allowFavoritesDelineationInUnreadCount: boolean; 47 allowFavoritesDelineationInUnreadCount: boolean;
49 disablewebsecurity: boolean; 48 disablewebsecurity: boolean;
50 autoHibernate: boolean;
51 path: string; 49 path: string;
52 partition: string; 50 partition: string;
53 local: boolean; 51 local: boolean;
@@ -97,9 +95,6 @@ export default class Recipe implements IRecipe {
97 95
98 disablewebsecurity = DEFAULT_SERVICE_SETTINGS.disablewebsecurity; 96 disablewebsecurity = DEFAULT_SERVICE_SETTINGS.disablewebsecurity;
99 97
100 // TODO: Is this even used?
101 autoHibernate = DEFAULT_SERVICE_SETTINGS.autoHibernate;
102
103 path = ''; 98 path = '';
104 99
105 partition = ''; 100 partition = '';
@@ -169,10 +164,6 @@ export default class Recipe implements IRecipe {
169 data.config.disablewebsecurity, 164 data.config.disablewebsecurity,
170 this.disablewebsecurity, 165 this.disablewebsecurity,
171 ); 166 );
172 this.autoHibernate = ifUndefined<boolean>(
173 data.config.autoHibernate,
174 this.autoHibernate,
175 );
176 this.local = ifUndefined<boolean>(data.config.local, this.local); 167 this.local = ifUndefined<boolean>(data.config.local, this.local);
177 this.message = ifUndefined<string>(data.config.message, this.message); 168 this.message = ifUndefined<string>(data.config.message, this.message);
178 this.allowFavoritesDelineationInUnreadCount = ifUndefined<boolean>( 169 this.allowFavoritesDelineationInUnreadCount = ifUndefined<boolean>(