mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-15 15:02:49 +01:00
bugfix: Since syncing is cross-device we need to take read status from backup.
I fixed this before but I believe it slipped past while refactoring and splitting into smaller PR, This fixes the unread chapter so if a device have unread chapters or user marked it as unread it should restore it properly now. Signed-off-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
parent
96a767aa0c
commit
fdc85bd314
@ -454,8 +454,8 @@ class BackupManager(
|
||||
if (dbChapter != null) {
|
||||
updatedChapter = updatedChapter.copy(id = dbChapter._id)
|
||||
updatedChapter = updatedChapter.copyFrom(dbChapter)
|
||||
if (dbChapter.read && !updatedChapter.read) {
|
||||
updatedChapter = updatedChapter.copy(read = true, lastPageRead = dbChapter.last_page_read)
|
||||
if (dbChapter.read != chapter.read) {
|
||||
updatedChapter = updatedChapter.copy(read = chapter.read, lastPageRead = chapter.lastPageRead)
|
||||
} else if (updatedChapter.lastPageRead == 0L && dbChapter.last_page_read != 0L) {
|
||||
updatedChapter = updatedChapter.copy(lastPageRead = dbChapter.last_page_read)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user