Handle notification for multiple timers

- update title for timer notification in finished state to be the label if it is empty
- remove duration field from the TimerEvent.Reset
This commit is contained in:
Paul Akhamiogu
2021-09-08 09:04:25 +01:00
parent a214ef9327
commit a91bc07dd3
4 changed files with 5 additions and 5 deletions

View File

@ -311,7 +311,7 @@ fun Context.getTimerNotification(timer: Timer, pendingIntent: PendingIntent, add
val reminderActivityIntent = getReminderActivityIntent()
val builder = NotificationCompat.Builder(this)
.setContentTitle(getString(R.string.timer))
.setContentTitle(if(timer.label.isEmpty()) getString(R.string.timer) else timer.label)
.setContentText(getString(R.string.time_expired))
.setSmallIcon(R.drawable.ic_timer)
.setContentIntent(pendingIntent)