forked from firka/student-legacy
forgot to add listen:false
This commit is contained in:
parent
0f97dddcd8
commit
f6ff98c5ed
@ -59,8 +59,8 @@ class NotificationsScreen extends StatelessWidget {
|
|||||||
|
|
||||||
void setAllAsSeen(BuildContext context) {
|
void setAllAsSeen(BuildContext context) {
|
||||||
// Set all notification categories as seen to avoid spamming the user with notifications when they turn on notifications
|
// Set all notification categories as seen to avoid spamming the user with notifications when they turn on notifications
|
||||||
DatabaseProvider database = Provider.of<DatabaseProvider>(context);
|
DatabaseProvider database = Provider.of<DatabaseProvider>(context, listen: false);
|
||||||
User? user = Provider.of<UserProvider>(context).user;
|
User? user = Provider.of<UserProvider>(context, listen: false).user;
|
||||||
if(user != null) {
|
if(user != null) {
|
||||||
for(LastSeenCategory category in LastSeenCategory.values) {
|
for(LastSeenCategory category in LastSeenCategory.values) {
|
||||||
database.userStore.storeLastSeen(DateTime.now(), userId: user.id, category: category);
|
database.userStore.storeLastSeen(DateTime.now(), userId: user.id, category: category);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user