Skip to content

Commit

Permalink
fix concurrent notification issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nonproto committed Nov 30, 2021
1 parent 5693812 commit 1e573be
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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())
}
Expand Down

0 comments on commit 1e573be

Please sign in to comment.