forked from github/szkolny
[Firebase] Disable notifications for past shared events.
This commit is contained in:
parent
48b7adb564
commit
2990fc5479
@ -164,7 +164,7 @@ class SzkolnyAppFirebase(val app: App, val profiles: List<Profile>, val message:
|
||||
val type = if (event.isHomework) Notification.TYPE_NEW_SHARED_HOMEWORK else Notification.TYPE_NEW_SHARED_EVENT
|
||||
val notificationFilter = app.config.getFor(event.profileId).sync.notificationFilter
|
||||
|
||||
if (!notificationFilter.contains(type) && event.sharedBy != "self") {
|
||||
if (!notificationFilter.contains(type) && event.sharedBy != "self" && event.date >= Date.getToday()) {
|
||||
val notification = Notification(
|
||||
id = Notification.buildId(event.profileId, type, event.id),
|
||||
title = app.getNotificationTitle(type),
|
||||
|
Loading…
Reference in New Issue
Block a user