mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
vibrate at elapsed timers only if needed
This commit is contained in:
@ -307,7 +307,7 @@ fun Context.getTimerNotification(timer: Timer, pendingIntent: PendingIntent, add
|
|||||||
vibrationPattern = longArrayOf(0L)
|
vibrationPattern = longArrayOf(0L)
|
||||||
}
|
}
|
||||||
|
|
||||||
enableVibration(true)
|
enableVibration(timer.vibrate)
|
||||||
notificationManager.createNotificationChannel(this)
|
notificationManager.createNotificationChannel(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,7 +326,11 @@ fun Context.getTimerNotification(timer: Timer, pendingIntent: PendingIntent, add
|
|||||||
.addAction(
|
.addAction(
|
||||||
R.drawable.ic_cross_vector,
|
R.drawable.ic_cross_vector,
|
||||||
getString(R.string.dismiss),
|
getString(R.string.dismiss),
|
||||||
if (addDeleteIntent) reminderActivityIntent else getHideTimerPendingIntent(timer.id!!)
|
if (addDeleteIntent) {
|
||||||
|
reminderActivityIntent
|
||||||
|
} else {
|
||||||
|
getHideTimerPendingIntent(timer.id!!)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (addDeleteIntent) {
|
if (addDeleteIntent) {
|
||||||
|
Reference in New Issue
Block a user