Update AndroidNotificationTray.kt

pull/627/head
Nguyen Ly Nam 5 years ago committed by GitHub
parent 21fc5ae85c
commit 0eb5c4e443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -95,7 +95,8 @@ class AndroidNotificationTray
context.getString(R.string.no), context.getString(R.string.no),
pendingIntents.removeRepetition(habit)) pendingIntents.removeRepetition(habit))
val enterAction = Action(R.drawable.ic_action_check, val enterAction = Action(
R.drawable.ic_action_check,
context.getString(R.string.enter), context.getString(R.string.enter),
pendingIntents.setNumericalValue(context, habit, 0, null)) pendingIntents.setNumericalValue(context, habit, 0, null))
@ -110,7 +111,7 @@ class AndroidNotificationTray
val builder = Builder(context, REMINDERS_CHANNEL_ID) val builder = Builder(context, REMINDERS_CHANNEL_ID)
.setSmallIcon(R.drawable.ic_notification) .setSmallIcon(R.drawable.ic_notification)
.setContentTitle(habit.name) .setContentTitle(habit.name)
.setContentText(if (habit.question.isBlank()) defaultText else habit.question) .setContentText(if(habit.question.isBlank()) defaultText else habit.question)
.setContentIntent(pendingIntents.showHabit(habit)) .setContentIntent(pendingIntents.showHabit(habit))
.setDeleteIntent(pendingIntents.dismissNotification(habit)) .setDeleteIntent(pendingIntents.dismissNotification(habit))
.setSound(null) .setSound(null)

Loading…
Cancel
Save