backend changes
This commit is contained in:
@@ -44,7 +44,8 @@ class NotificationsHelper {
|
||||
|
||||
// loop through grades and see which hasn't been seen yet
|
||||
for (Grade grade in grades) {
|
||||
if (grade.seenDate.isAfter(lastSeenGrade)) {
|
||||
// if the grade was added over a week ago, don't show it to avoid notification spam
|
||||
if (grade.seenDate.isAfter(lastSeenGrade) && grade.date.difference(DateTime.now()).inDays * -1 < 7) {
|
||||
// send notificiation about new grade
|
||||
const AndroidNotificationDetails androidNotificationDetails =
|
||||
AndroidNotificationDetails('GRADES', 'Jegyek',
|
||||
|
||||
@@ -89,6 +89,7 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
|
||||
|
||||
// Grades
|
||||
case FilterType.grades:
|
||||
gradeProvider.seenAll();
|
||||
items = grade_filter.getWidgets(
|
||||
gradeProvider.grades, gradeProvider.lastSeenDate);
|
||||
if (settingsProvider.gradeOpeningFun) {
|
||||
|
||||
Reference in New Issue
Block a user