mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
delete notification channels only on Android Oreo
This commit is contained in:
@@ -214,8 +214,10 @@ fun Context.getNotification(pendingIntent: PendingIntent, event: Event, content:
|
|||||||
// create a new channel for every new sound uri as the new Android Oreo notification system is fundamentally broken
|
// create a new channel for every new sound uri as the new Android Oreo notification system is fundamentally broken
|
||||||
if (soundUri != config.lastSoundUri || config.lastVibrateOnReminder != config.vibrateOnReminder) {
|
if (soundUri != config.lastSoundUri || config.lastVibrateOnReminder != config.vibrateOnReminder) {
|
||||||
if (!publicVersion) {
|
if (!publicVersion) {
|
||||||
val oldChannelId = "simple_calendar_${config.lastReminderChannel}_${config.reminderAudioStream}"
|
if (isOreoPlus()) {
|
||||||
notificationManager.deleteNotificationChannel(oldChannelId)
|
val oldChannelId = "simple_calendar_${config.lastReminderChannel}_${config.reminderAudioStream}"
|
||||||
|
notificationManager.deleteNotificationChannel(oldChannelId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
config.lastVibrateOnReminder = config.vibrateOnReminder
|
config.lastVibrateOnReminder = config.vibrateOnReminder
|
||||||
|
Reference in New Issue
Block a user