From a35995b8988b6a81b68037dfb433053201d24ae3 Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 21 Apr 2022 22:48:45 +0200 Subject: [PATCH] Fix crash on History tab when there is no next chapter (#6970) --- .../eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt index 65f452c48..eff06438c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt @@ -95,7 +95,9 @@ class HistoryPresenter( fun getNextChapterForManga(mangaId: Long, chapterId: Long) { presenterScope.launchIO { val chapter = getNextChapterForManga.await(mangaId, chapterId) - view?.openChapter(chapter) + launchUI { + view?.openChapter(chapter) + } } }