Throttle notification cancellation

pull/1212/head
Alex Baker 5 years ago
parent 9ab469ea17
commit e7f61f4050

@ -56,9 +56,11 @@ class NotificationManager @Inject constructor(
@SuppressLint("CheckResult")
suspend fun cancel(ids: Iterable<Long>) {
for (id in ids) {
throttle.run {
notificationManagerCompat.cancel(id.toInt())
queue.remove(id)
}
}
notificationDao.deleteAll(ids.toList())
notifyTasks(emptyList(), alert = false, nonstop = false, fiveTimes = false)
}

Loading…
Cancel
Save