mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 20:19:05 +01:00
Add banner for Incognito Mode
This commit is contained in:
@@ -169,6 +169,10 @@ class MainActivity : BaseActivity<MainActivityBinding>() {
|
||||
preferences.downloadedOnly()
|
||||
.asImmediateFlow { binding.downloadedOnly.isVisible = it }
|
||||
.launchIn(scope)
|
||||
|
||||
preferences.incognitoMode()
|
||||
.asImmediateFlow { binding.incognitoMode.isVisible = it }
|
||||
.launchIn(scope)
|
||||
}
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
|
||||
@@ -409,7 +409,7 @@ class ReaderPresenter(
|
||||
* Saves this [chapter] last read history.
|
||||
*/
|
||||
private fun saveChapterHistory(chapter: ReaderChapter) {
|
||||
if (!preferences.incognitoMode()) {
|
||||
if (!preferences.incognitoMode().get()) {
|
||||
val history = History.create(chapter.chapter).apply { last_read = Date().time }
|
||||
db.updateHistoryLastRead(history).asRxCompletable()
|
||||
.onErrorComplete()
|
||||
|
||||
Reference in New Issue
Block a user