From 3a2492178fcbc84eac33a9f0105f88c910c721e7 Mon Sep 17 00:00:00 2001 From: André Oliveira Date: Tue, 19 Jul 2022 10:47:44 +0100 Subject: 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. --- src/config.ts | 1 - src/containers/settings/EditServiceScreen.tsx | 7 +------ src/models/Recipe.ts | 9 --------- 3 files changed, 1 insertion(+), 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 = { hasHostedOption: false, allowFavoritesDelineationInUnreadCount: false, disablewebsecurity: false, - autoHibernate: false, }; 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 { const { stores } = this.props; - const { action } = stores.router.pathValue; - let defaultSpellcheckerLanguage = SPELLCHECKER_LOCALES[stores.settings.app.spellcheckerLanguage]; @@ -190,10 +188,7 @@ class EditServiceScreen extends Component { }, isHibernationEnabled: { label: intl.formatMessage(messages.enableHibernation), - value: - action !== 'edit' - ? recipe.autoHibernate - : service?.isHibernationEnabled, + value: service?.isHibernationEnabled, default: DEFAULT_SERVICE_SETTINGS.isHibernationEnabled, }, 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 { urlInputPrefix?: string; urlInputSuffix?: string; disablewebsecurity?: boolean; - autoHibernate?: boolean; partition?: string; local?: boolean; message?: string; @@ -47,7 +46,6 @@ export interface IRecipe { message: string; allowFavoritesDelineationInUnreadCount: boolean; disablewebsecurity: boolean; - autoHibernate: boolean; path: string; partition: string; local: boolean; @@ -97,9 +95,6 @@ export default class Recipe implements IRecipe { disablewebsecurity = DEFAULT_SERVICE_SETTINGS.disablewebsecurity; - // TODO: Is this even used? - autoHibernate = DEFAULT_SERVICE_SETTINGS.autoHibernate; - path = ''; partition = ''; @@ -169,10 +164,6 @@ export default class Recipe implements IRecipe { data.config.disablewebsecurity, this.disablewebsecurity, ); - this.autoHibernate = ifUndefined( - data.config.autoHibernate, - this.autoHibernate, - ); this.local = ifUndefined(data.config.local, this.local); this.message = ifUndefined(data.config.message, this.message); this.allowFavoritesDelineationInUnreadCount = ifUndefined( -- cgit v1.2.3-54-g00ecf