|
|
@ -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)
|
|
|
|