4ae9dbe524
* feat: db changes to accommodate new syncing logic. Using timestamp to sync is a bit skewed due to system clock etc and therefore there was a lot of issues with it such as removing a manga that shouldn't have been removed. Marking chapters as unread even though it was marked as a read. Hopefully by using versioning system it should eliminate those issues. * chore: add new line. * chore: remove isSyncing from Chapter/Manga model. * chore: remove isSyncing leftover. * chore: remove isSyncing. * refactor: remove isSync guard. Just use it directly to 1 now since we don't have the isSyncing field in Manga or Chapter. * Lint and stuff * Add missing , --------- Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
36 lines
796 B
Kotlin
36 lines
796 B
Kotlin
package tachiyomi.domain.chapter.model
|
|
|
|
data class ChapterUpdate(
|
|
val id: Long,
|
|
val mangaId: Long? = null,
|
|
val read: Boolean? = null,
|
|
val bookmark: Boolean? = null,
|
|
val lastPageRead: Long? = null,
|
|
val dateFetch: Long? = null,
|
|
val sourceOrder: Long? = null,
|
|
val url: String? = null,
|
|
val name: String? = null,
|
|
val dateUpload: Long? = null,
|
|
val chapterNumber: Double? = null,
|
|
val scanlator: String? = null,
|
|
val version: Long? = null,
|
|
)
|
|
|
|
fun Chapter.toChapterUpdate(): ChapterUpdate {
|
|
return ChapterUpdate(
|
|
id,
|
|
mangaId,
|
|
read,
|
|
bookmark,
|
|
lastPageRead,
|
|
dateFetch,
|
|
sourceOrder,
|
|
url,
|
|
name,
|
|
dateUpload,
|
|
chapterNumber,
|
|
scanlator,
|
|
version,
|
|
)
|
|
}
|