add a double check to not show notification to ignored event occurrences

This commit is contained in:
tibbi 2017-03-05 21:26:44 +01:00
parent 19bc2b627f
commit 6d93a7def5
1 changed files with 4 additions and 2 deletions

View File

@ -32,8 +32,10 @@ class NotificationReceiver : BroadcastReceiver() {
val pendingIntent = getPendingIntent(context, event) val pendingIntent = getPendingIntent(context, event)
val startTime = Formatter.getTimeFromTS(context, event.startTS) val startTime = Formatter.getTimeFromTS(context, event.startTS)
val endTime = Formatter.getTimeFromTS(context, event.endTS) val endTime = Formatter.getTimeFromTS(context, event.endTS)
val notification = getNotification(context, pendingIntent, event.title, "${getEventTime(startTime, endTime)} ${event.description}") if (!event.ignoreEventOccurrences.contains(event.startTS)) {
notificationManager.notify(id, notification) val notification = getNotification(context, pendingIntent, event.title, "${getEventTime(startTime, endTime)} ${event.description}")
notificationManager.notify(id, notification)
}
context.scheduleNextEventReminder(event) context.scheduleNextEventReminder(event)
} }