From 4f94102352d6bce8f1602dc0e251d5325df43a7f Mon Sep 17 00:00:00 2001 From: jld3103 Date: Thu, 2 Nov 2023 17:45:37 +0100 Subject: [PATCH] refactor(neon): Remove unnecessary options resets for invalid values Signed-off-by: jld3103 --- packages/neon/neon/lib/src/utils/global_options.dart | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/neon/neon/lib/src/utils/global_options.dart b/packages/neon/neon/lib/src/utils/global_options.dart index 01d93d90..73425ac1 100644 --- a/packages/neon/neon/lib/src/utils/global_options.dart +++ b/packages/neon/neon/lib/src/utils/global_options.dart @@ -101,10 +101,6 @@ class GlobalOptions extends OptionsCollection { (final account) => MapEntry(account.id, (final context) => account.humanReadableID), ), ); - - if (!initialAccount.values.containsKey(initialAccount.value)) { - initialAccount.reset(); - } } /// Updates the values of [pushNotificationsDistributor]. @@ -118,12 +114,7 @@ class GlobalOptions extends OptionsCollection { ), ); - final enabled = pushNotificationsDistributor.values.isNotEmpty; - pushNotificationsEnabled.enabled = enabled; - if (!enabled) { - pushNotificationsDistributor.reset(); - pushNotificationsEnabled.reset(); - } + pushNotificationsEnabled.enabled = pushNotificationsDistributor.values.isNotEmpty; } /// The theme mode of the app implementing the Neon framework.