From f6ff98c5edca21f1758d4c13925f09ba16a70fc5 Mon Sep 17 00:00:00 2001 From: hihihaha <71922530+Monke14@users.noreply.github.com> Date: Sat, 2 Mar 2024 19:14:11 +0100 Subject: [PATCH] forgot to add listen:false --- .../lib/screens/settings/notifications_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refilc_mobile_ui/lib/screens/settings/notifications_screen.dart b/refilc_mobile_ui/lib/screens/settings/notifications_screen.dart index c79e85e..ba4b618 100644 --- a/refilc_mobile_ui/lib/screens/settings/notifications_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/notifications_screen.dart @@ -59,8 +59,8 @@ class NotificationsScreen extends StatelessWidget { void setAllAsSeen(BuildContext context) { // Set all notification categories as seen to avoid spamming the user with notifications when they turn on notifications - DatabaseProvider database = Provider.of(context); - User? user = Provider.of(context).user; + DatabaseProvider database = Provider.of(context, listen: false); + User? user = Provider.of(context, listen: false).user; if(user != null) { for(LastSeenCategory category in LastSeenCategory.values) { database.userStore.storeLastSeen(DateTime.now(), userId: user.id, category: category);