fix(DownloadQueue): Use CopyOnWriteArrayList to further prevent ConcurrentModificationException

This commit is contained in:
Ahmad Ansori Palembani 2024-12-03 08:40:36 +07:00
parent ea9407b49d
commit d2fdbf8717
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -20,7 +20,7 @@ class DownloadQueue(
private val updatedRelay = PublishRelay.create<Unit>() private val updatedRelay = PublishRelay.create<Unit>()
private val downloadListeners = mutableListOf<DownloadListener>() private val downloadListeners: MutableList<DownloadListener> = CopyOnWriteArrayList<DownloadListener>()
private var scope = MainScope() private var scope = MainScope()