@@ -180,7 +180,7 @@ data class Illust(
180180 override val objectUniqueId: Long
181181 get() = id
182182 override val objectType: Int
183- get() = ObjectSpec .Illust
183+ get() = ObjectSpec .KOTLIN_ILLUST
184184
185185 fun displayCreateDate (): String {
186186 return DateParse .displayCreateDate(create_date)
@@ -272,7 +272,7 @@ data class User(
272272 override val objectUniqueId: Long
273273 get() = if (id > 0L ) id else user_id
274274 override val objectType: Int
275- get() = ObjectSpec .KUser
275+ get() = ObjectSpec .KOTLIN_USER
276276
277277 fun isOfficial (): Boolean {
278278 return ConstantUser .officialUsers.contains(id)
@@ -449,7 +449,12 @@ data class UserPreview(
449449 val is_muted : Boolean? = null ,
450450 val novels : List <Any >? = null ,
451451 val user : User ? = null
452- ) : Serializable
452+ ) : Serializable, ModelObject {
453+ override val objectUniqueId: Long
454+ get() = hashCode().toLong()
455+ override val objectType: Int
456+ get() = ObjectSpec .USER_PREVIEW
457+ }
453458
454459data class UserPreviewResponse (
455460 val user_previews : List <UserPreview > = listOf(),
@@ -473,10 +478,15 @@ data class TrendingTag(
473478 val tag : String? = null ,
474479 val translated_name : String? = null ,
475480 val illust : Illust ? = null ,
476- ) : Serializable {
481+ ) : Serializable, ModelObject {
477482 fun buildTag (): Tag {
478483 return Tag (name = tag, translated_name = translated_name)
479484 }
485+
486+ override val objectUniqueId: Long
487+ get() = illust?.id ? : 0L
488+ override val objectType: Int
489+ get() = ObjectSpec .TRENDING_TAG
480490}
481491
482492data class NotificationResponse (
@@ -741,7 +751,7 @@ data class Novel(
741751 override val objectUniqueId: Long
742752 get() = id
743753 override val objectType: Int
744- get() = ObjectSpec .POST
754+ get() = ObjectSpec .KOTLIN_NOVEL
745755}
746756
747757data class Series (
0 commit comments