mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-15 15:02:49 +01:00
refactor: make sure the read status is taken from backup.
This way it will mark chapters as unread if it's not read and vice versa. Signed-off-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
parent
2747e15953
commit
6c4f1184cb
@ -292,8 +292,8 @@ class BackupRestorer(
|
||||
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