From c07ed374e8d0cd89c9237cc87ea10526f4627da4 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 3 May 2020 03:06:44 -0400 Subject: [PATCH] Fixed manga details crash on error --- .../eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt index c19c8a67d3..072f886170 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt @@ -440,15 +440,14 @@ class MangaDetailsPresenter( } isLoading = false if (chapterError == null) withContext(Dispatchers.Main) { controller.updateChapters(this@MangaDetailsPresenter.chapters) } - else { + if (chapterError != null) { withContext(Dispatchers.Main) { controller.showError( - trimException(mangaError!!) + trimException(chapterError!!) ) } return@launch - } - if (mangaError != null) withContext(Dispatchers.Main) { + } else if (mangaError != null) withContext(Dispatchers.Main) { controller.showError( trimException(mangaError!!) )