Revert change to not delete evicted notifications

pull/2884/head
Alex Baker 4 weeks ago
parent c9fc02a42e
commit 3327f97a17

@ -55,14 +55,12 @@ class NotificationManager @Inject constructor(
} }
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
suspend fun cancel(ids: Iterable<Long>, delete: Boolean = true) { suspend fun cancel(ids: Iterable<Long>) {
for (id in ids) { for (id in ids) {
notificationManager.cancel(id.toInt()) notificationManager.cancel(id.toInt())
} }
queue.remove(ids) queue.remove(ids)
if (delete) { notificationDao.deleteAll(ids.toList())
notificationDao.deleteAll(ids.toList())
}
notifyTasks(emptyList(), alert = false, nonstop = false, fiveTimes = false) notifyTasks(emptyList(), alert = false, nonstop = false, fiveTimes = false)
} }
@ -212,7 +210,7 @@ class NotificationManager @Inject constructor(
) )
val evicted = queue.add(notificationId) val evicted = queue.add(notificationId)
if (evicted.size > 0) { if (evicted.size > 0) {
cancel(evicted, delete = false) cancel(evicted)
} }
for (i in 0 until ringTimes) { for (i in 0 until ringTimes) {
if (i > 0) { if (i > 0) {

Loading…
Cancel
Save