@@ -4,6 +4,7 @@ import kotlinx.serialization.Serializable
|
|||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.protobuf.ProtoNumber
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
import mihon.core.common.extensions.EMPTY
|
import mihon.core.common.extensions.EMPTY
|
||||||
|
import mihon.core.common.extensions.JsonObjectEmptyBytes
|
||||||
import tachiyomi.data.MemoColumnAdapter
|
import tachiyomi.data.MemoColumnAdapter
|
||||||
import tachiyomi.domain.chapter.model.Chapter
|
import tachiyomi.domain.chapter.model.Chapter
|
||||||
|
|
||||||
@@ -25,7 +26,7 @@ class BackupChapter(
|
|||||||
@ProtoNumber(10) var sourceOrder: Long = 0,
|
@ProtoNumber(10) var sourceOrder: Long = 0,
|
||||||
@ProtoNumber(11) var lastModifiedAt: Long = 0,
|
@ProtoNumber(11) var lastModifiedAt: Long = 0,
|
||||||
@ProtoNumber(12) var version: Long = 0,
|
@ProtoNumber(12) var version: Long = 0,
|
||||||
@ProtoNumber(13) var memo: ByteArray = byteArrayOf(),
|
@ProtoNumber(13) var memo: ByteArray = JsonObjectEmptyBytes,
|
||||||
) {
|
) {
|
||||||
fun toChapterImpl(): Chapter {
|
fun toChapterImpl(): Chapter {
|
||||||
return Chapter.create().copy(
|
return Chapter.create().copy(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import kotlinx.serialization.Serializable
|
|||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.protobuf.ProtoNumber
|
import kotlinx.serialization.protobuf.ProtoNumber
|
||||||
import mihon.core.common.extensions.EMPTY
|
import mihon.core.common.extensions.EMPTY
|
||||||
|
import mihon.core.common.extensions.JsonObjectEmptyBytes
|
||||||
import tachiyomi.data.MemoColumnAdapter
|
import tachiyomi.data.MemoColumnAdapter
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ class BackupManga(
|
|||||||
@ProtoNumber(109) var version: Long = 0,
|
@ProtoNumber(109) var version: Long = 0,
|
||||||
@ProtoNumber(110) var notes: String = "",
|
@ProtoNumber(110) var notes: String = "",
|
||||||
@ProtoNumber(111) var initialized: Boolean = false,
|
@ProtoNumber(111) var initialized: Boolean = false,
|
||||||
@ProtoNumber(112) var memo: ByteArray = byteArrayOf(),
|
@ProtoNumber(112) var memo: ByteArray = JsonObjectEmptyBytes,
|
||||||
) {
|
) {
|
||||||
fun getMangaImpl(): Manga {
|
fun getMangaImpl(): Manga {
|
||||||
return Manga.create().copy(
|
return Manga.create().copy(
|
||||||
|
|||||||
@@ -4,5 +4,7 @@ import kotlinx.serialization.json.JsonObject
|
|||||||
|
|
||||||
val JsonObjectEmpty = JsonObject(emptyMap())
|
val JsonObjectEmpty = JsonObject(emptyMap())
|
||||||
|
|
||||||
|
val JsonObjectEmptyBytes = byteArrayOf(0x7B, 0x7D)
|
||||||
|
|
||||||
val JsonObject.Companion.EMPTY: JsonObject
|
val JsonObject.Companion.EMPTY: JsonObject
|
||||||
inline get() = JsonObjectEmpty
|
inline get() = JsonObjectEmpty
|
||||||
|
|||||||
Reference in New Issue
Block a user