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 e33f92c3ce..37d4332984 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 @@ -88,8 +88,8 @@ class TrackPresenter( .flatMap { db.insertTrack(item).asRxObservable() } .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe({ }, - { error -> context.toast(error.message) })) + .subscribeFirst({ view, _ -> view.onRefreshDone() }, + TrackController::onRefreshError)) } else { db.deleteTrackForManga(manga, service).executeAsBlocking() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt index e07c682627..473092544e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt @@ -14,6 +14,7 @@ import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.ui.base.controller.DialogController import eu.kanade.tachiyomi.util.plusAssign +import kotlinx.android.synthetic.main.track_controller.* import kotlinx.android.synthetic.main.track_search_dialog.view.* import rx.Subscription import rx.android.schedulers.AndroidSchedulers @@ -133,6 +134,7 @@ class TrackSearchDialog : DialogController { } private fun onPositiveButtonClick() { + trackController.swipe_refresh.isRefreshing = true trackController.presenter.registerTracking(selectedItem, service) }