From 40776bdc8d4e3c42e0874ec3fec84c515b486dee Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 8 May 2020 19:04:45 -0400 Subject: [PATCH] Concurrently refresh trackers --- .../eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/manga/track/TrackPresenter.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt index e5adbcfbb..276f6bdf9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreService.kt @@ -394,7 +394,7 @@ class BackupRestoreService : Service() { */ private fun trackingFetchObservable(manga: Manga, tracks: List): Observable { return Observable.from(tracks) - .concatMap { track -> + .flatMap { track -> val service = trackManager.getService(track.sync_id) if (service != null && service.isLogged) { service.refresh(track) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackPresenter.kt index 31794cb9e..85d28c55b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackPresenter.kt @@ -58,7 +58,7 @@ class TrackPresenter( refreshSubscription?.let { remove(it) } refreshSubscription = Observable.from(trackList) .filter { it.track != null } - .concatMap { item -> + .flatMap { item -> item.service.refresh(item.track!!) .flatMap { db.insertTrack(it).asRxObservable() } .map { item }