Revert history Compose/SQLDelight changes
This commit is contained in:
@@ -97,19 +97,14 @@ import kotlin.math.max
|
||||
class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
||||
|
||||
companion object {
|
||||
|
||||
fun newIntent(context: Context, mangaId: Long?, chapterId: Long?): Intent {
|
||||
fun newIntent(context: Context, manga: Manga, chapter: Chapter): Intent {
|
||||
return Intent(context, ReaderActivity::class.java).apply {
|
||||
putExtra("manga", mangaId)
|
||||
putExtra("chapter", chapterId)
|
||||
putExtra("manga", manga.id)
|
||||
putExtra("chapter", chapter.id)
|
||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
}
|
||||
}
|
||||
|
||||
fun newIntent(context: Context, manga: Manga, chapter: Chapter): Intent {
|
||||
return newIntent(context, manga.id, chapter.id)
|
||||
}
|
||||
|
||||
private const val ENABLED_BUTTON_IMAGE_ALPHA = 255
|
||||
private const val DISABLED_BUTTON_IMAGE_ALPHA = 64
|
||||
|
||||
|
||||
@@ -449,7 +449,7 @@ class ReaderPresenter(
|
||||
private fun saveChapterHistory(chapter: ReaderChapter) {
|
||||
if (!incognitoMode) {
|
||||
val history = History.create(chapter.chapter).apply { last_read = Date().time }
|
||||
db.upsertHistoryLastRead(history).asRxCompletable()
|
||||
db.updateHistoryLastRead(history).asRxCompletable()
|
||||
.onErrorComplete()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe()
|
||||
|
||||
Reference in New Issue
Block a user