Removed an if statement

Removed the check if a summary was already shown.
pull/322/head
TruffelNL 8 years ago
parent 1c2abb543b
commit f6620be2d9

@ -46,8 +46,6 @@ class AndroidNotificationTray
private val generalLoopNotificationGroup = "generalLoopHabitsNotificationGroup" private val generalLoopNotificationGroup = "generalLoopHabitsNotificationGroup"
private var summaryShown = false
override fun removeNotification(id: Int) override fun removeNotification(id: Int)
{ {
NotificationManagerCompat.from(context).cancel(id) NotificationManagerCompat.from(context).cancel(id)
@ -60,15 +58,10 @@ class AndroidNotificationTray
{ {
val notificationManager = NotificationManagerCompat.from(context) val notificationManager = NotificationManagerCompat.from(context)
if(! summaryShown)
{
val summary = buildSummary(reminderTime) val summary = buildSummary(reminderTime)
notificationManager.notify(Int.MAX_VALUE, summary) notificationManager.notify(Int.MAX_VALUE, summary)
summaryShown = true
}
val notification = buildNotification(habit, reminderTime, timestamp) val notification = buildNotification(habit, reminderTime, timestamp)
notificationManager.notify(notificationId, notification) notificationManager.notify(notificationId, notification)

Loading…
Cancel
Save