From 67e9d79a1a7c8b82c03445854f91c536d8abd6e2 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 26 Apr 2020 19:11:05 -0400 Subject: [PATCH] Fixed swipe refresh not showing sometimes while browsing --- .../tachiyomi/ui/manga/MangaDetailsController.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt index 30d9649c01..45079a00b5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt @@ -211,8 +211,6 @@ class MangaDetailsController : BaseController, presenter.onCreate() swipe_refresh.isRefreshing = presenter.isLoading - if (manga?.initialized != true) - swipe_refresh.post { swipe_refresh.isRefreshing = true } swipe_refresh.setOnRefreshListener { presenter.refreshAll() } } @@ -551,6 +549,16 @@ class MangaDetailsController : BaseController, } } + override fun onChangeEnded( + changeHandler: ControllerChangeHandler, + type: ControllerChangeType + ) { + super.onChangeEnded(changeHandler, type) + if (type == ControllerChangeType.PUSH_ENTER) { + swipe_refresh?.isRefreshing = presenter.isLoading + } + } + override fun handleBack(): Boolean { if (manga_cover_full?.visibility == View.VISIBLE) { manga_cover_full?.performClick()