diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 51fa73cc1e..5b8a07af39 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -226,6 +226,11 @@ class ReaderActivity : BaseRxActivity() { super.onSaveInstanceState(outState) } + override fun onPause() { + presenter.saveProgress() + super.onPause() + } + /** * Set menu visibility again on activity resume to apply immersive mode again if needed. * Helps with rotations. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt index 946df975e6..7a66b2fcba 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt @@ -465,6 +465,10 @@ class ReaderPresenter( } } + fun saveProgress() { + getCurrentChapter()?.let { onChapterChanged(it) } + } + /** * Called from the activity to preload the given [chapter]. */