From d9e64412e34a5de64942296c453b6d4f2d18f6c5 Mon Sep 17 00:00:00 2001 From: Hitesh Kumar Saini Date: Sat, 9 Jul 2022 16:27:26 +0530 Subject: [PATCH] hotfix: call reload inside SettingsProvider.ensureInitialized if singleton was already initialized * In some cases, Dart VM may still be alive in background & may still keep old snoozedUntil value, causing notification to show when it actually should not. * Having this call present causes value to be updated again from hive database, once likely updated from notification snooze buttons. --- lib/providers/settings_provider.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/providers/settings_provider.dart b/lib/providers/settings_provider.dart index f7ec21ff..d5df5b0f 100644 --- a/lib/providers/settings_provider.dart +++ b/lib/providers/settings_provider.dart @@ -107,6 +107,7 @@ class SettingsProvider extends ChangeNotifier { debugPrint(exception.toString()); debugPrint(stacktrace.toString()); } + await instance.reload(); return instance; }