[Feature Request] Option to turn off History - #3772 (#3855)

* Implementing do not save chapter history preference

* Refactor of labels

* Changing incognito mode from Readers section to More

* Fixing imports and removing unused strings
This commit is contained in:
Platiplus
2020-10-03 11:43:01 -03:00
committed by GitHub
parent 2df6a4dde8
commit 79ccfcd553
5 changed files with 23 additions and 5 deletions
@@ -409,11 +409,13 @@ class ReaderPresenter(
* Saves this [chapter] last read history.
*/
private fun saveChapterHistory(chapter: ReaderChapter) {
val history = History.create(chapter.chapter).apply { last_read = Date().time }
db.updateHistoryLastRead(history).asRxCompletable()
.onErrorComplete()
.subscribeOn(Schedulers.io())
.subscribe()
if (!preferences.incognitoMode()) {
val history = History.create(chapter.chapter).apply { last_read = Date().time }
db.updateHistoryLastRead(history).asRxCompletable()
.onErrorComplete()
.subscribeOn(Schedulers.io())
.subscribe()
}
}
/**