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);