Sfoglia il codice sorgente

Use a thread-safe list for downloads

len 9 anni fa
parent
commit
ec9c19ce7d

+ 2 - 2
app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt

@@ -4,9 +4,9 @@ import eu.kanade.tachiyomi.data.database.models.Chapter
 import eu.kanade.tachiyomi.data.source.model.Page
 import rx.Observable
 import rx.subjects.PublishSubject
-import java.util.*
+import java.util.concurrent.CopyOnWriteArrayList
 
-class DownloadQueue : ArrayList<Download>() {
+class DownloadQueue : CopyOnWriteArrayList<Download>() {
 
     private val statusSubject = PublishSubject.create<Download>()