Concurrently refresh trackers

This commit is contained in:
arkon 2020-05-08 19:04:45 -04:00
parent f853158e6b
commit 40776bdc8d
2 changed files with 2 additions and 2 deletions

View file

@ -394,7 +394,7 @@ class BackupRestoreService : Service() {
*/
private fun trackingFetchObservable(manga: Manga, tracks: List<Track>): Observable<Track> {
return Observable.from(tracks)
.concatMap { track ->
.flatMap { track ->
val service = trackManager.getService(track.sync_id)
if (service != null && service.isLogged) {
service.refresh(track)

View file

@ -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 }