Show toast when no next chapter found in library
Closes #8522 Will probably become a snackbar at some point. (cherry picked from commit db6528d3fa1919893ed4360b4f198809a294829f)
This commit is contained in:
parent
a1accd3ed3
commit
27a912c7e6
@ -36,6 +36,7 @@ import eu.kanade.tachiyomi.ui.manga.MangaController
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.util.lang.launchIO
|
||||
import eu.kanade.tachiyomi.util.lang.launchUI
|
||||
import eu.kanade.tachiyomi.util.lang.withUIContext
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import exh.favorites.FavoritesIntroDialog
|
||||
import exh.favorites.FavoritesSyncStatus
|
||||
@ -272,16 +273,18 @@ class LibraryController(
|
||||
}
|
||||
|
||||
private fun openManga(mangaId: Long) {
|
||||
// Notify the presenter a manga is being opened.
|
||||
presenter.onOpenManga()
|
||||
|
||||
router.pushController(MangaController(mangaId))
|
||||
}
|
||||
|
||||
private fun continueReading(libraryManga: LibraryManga) {
|
||||
viewScope.launchIO {
|
||||
val chapter = presenter.getNextUnreadChapter(libraryManga.manga)
|
||||
if (chapter != null) openChapter(chapter)
|
||||
if (chapter != null) {
|
||||
openChapter(chapter)
|
||||
} else {
|
||||
withUIContext { activity?.toast(R.string.no_next_chapter) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user