From 87ab6fa8de6b3f472c999b076401d8624ab0bc48 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 17 May 2020 04:53:36 -0400 Subject: [PATCH] Fix crash in maga details --- .../eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 301c768191..143536c45e 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 @@ -517,6 +517,7 @@ class MangaDetailsController : BaseController, } fun updateChapters(chapters: List) { + view ?: return swipe_refresh?.isRefreshing = presenter.isLoading if (presenter.chapters.isEmpty() && fromCatalogue && !presenter.hasRequested) { launchUI { swipe_refresh?.isRefreshing = true } @@ -524,7 +525,7 @@ class MangaDetailsController : BaseController, } adapter?.setChapters(chapters) addMangaHeader() - colorToolbar(recycler.canScrollVertically(-1)) + colorToolbar(recycler?.canScrollVertically(-1) == true) activity?.invalidateOptionsMenu() }