Removed an if statement

Removed the check if a summary was already shown.
This commit is contained in:
TruffelNL
2017-08-15 23:44:41 +02:00
parent 1c2abb543b
commit f6620be2d9

View File

@@ -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,14 +58,9 @@ 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)