From 1e573be5f3bc192831bf7532b42e824c2c8a5825 Mon Sep 17 00:00:00 2001 From: Carlos <2092019+CarlosEsco@users.noreply.github.com> Date: Tue, 30 Nov 2021 06:19:28 -0500 Subject: [PATCH] fix concurrent notification issue --- .../java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt index 29f0fd82aa..37d6b93ee7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt @@ -34,7 +34,7 @@ internal class DownloadNotifier(private val context: Context) { context.notificationBuilder(Notifications.CHANNEL_DOWNLOADER_PROGRESS) { setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher)) } - + } private val completeNotificationBuilder by lazy { @@ -69,6 +69,7 @@ internal class DownloadNotifier(private val context: Context) { * * @param id the id of the notification. */ + @Synchronized private fun NotificationCompat.Builder.show(id: Int) { context.notificationManager.notify(id, build()) }