Use a thread-safe list for downloads

This commit is contained in:
len 2016-04-26 14:00:22 +02:00
parent 31731e8f26
commit ec9c19ce7d

View File

@ -4,9 +4,9 @@ import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.source.model.Page import eu.kanade.tachiyomi.data.source.model.Page
import rx.Observable import rx.Observable
import rx.subjects.PublishSubject 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>() private val statusSubject = PublishSubject.create<Download>()