mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-11 05:59:10 +01:00
Save reader progress when activity is paused
This commit is contained in:
parent
1978b9a62e
commit
14ec89f654
@ -493,6 +493,11 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
||||
please_wait.startAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_in_long))
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
presenter.saveProgress()
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from the presenter whenever a new [viewerChapters] have been set. It delegates the
|
||||
* method to the current viewer, but also set the subtitle on the toolbar.
|
||||
|
@ -391,6 +391,8 @@ class ReaderPresenter(
|
||||
saveChapterHistory(fromChapter)
|
||||
}
|
||||
|
||||
fun saveProgress() = getCurrentChapter()?.let { onChapterChanged(it) }
|
||||
|
||||
/**
|
||||
* Saves this [chapter] progress (last read page and whether it's read).
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user