Drop explicitly copy constructor
This commit is contained in:
1 parent
f38f3989e7
commit
13346f1124
3 files changed
+28
-49
No files matched your search
@@ -3,11 +3,18 @@ package com.hippo.ehviewer.dao
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.Ignore
|
||||
import com.hippo.ehviewer.client.data.AbstractGalleryInfo
|
||||
import com.hippo.ehviewer.client.data.BaseGalleryInfo
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo
|
||||
|
||||
@Suppress("DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE")
|
||||
@Entity(tableName = "DOWNLOADS")
|
||||
class DownloadInfo() : BaseGalleryInfo() {
|
||||
class DownloadInfo(
|
||||
@Ignore
|
||||
val galleryInfo: GalleryInfo = BaseGalleryInfo(),
|
||||
) : BaseGalleryInfo(), AbstractGalleryInfo by galleryInfo {
|
||||
constructor() : this(galleryInfo = BaseGalleryInfo())
|
||||
|
||||
@ColumnInfo(name = "STATE")
|
||||
var state = 0
|
||||
|
||||
@@ -38,20 +45,6 @@ class DownloadInfo() : BaseGalleryInfo() {
|
||||
@Ignore
|
||||
var total = 0
|
||||
|
||||
constructor(galleryInfo: GalleryInfo) : this() {
|
||||
gid = galleryInfo.gid
|
||||
token = galleryInfo.token
|
||||
title = galleryInfo.title
|
||||
titleJpn = galleryInfo.titleJpn
|
||||
thumbKey = galleryInfo.thumbKey
|
||||
this.category = galleryInfo.category
|
||||
posted = galleryInfo.posted
|
||||
uploader = galleryInfo.uploader
|
||||
rating = galleryInfo.rating
|
||||
simpleTags = galleryInfo.simpleTags
|
||||
simpleLanguage = galleryInfo.simpleLanguage
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val STATE_INVALID = -1
|
||||
const val STATE_NONE = 0
|
||||
|
||||
@@ -2,30 +2,23 @@ package com.hippo.ehviewer.dao
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.Ignore
|
||||
import com.hippo.ehviewer.client.data.AbstractGalleryInfo
|
||||
import com.hippo.ehviewer.client.data.BaseGalleryInfo
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo.Companion.NOT_FAVORITED
|
||||
|
||||
@Suppress("DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE")
|
||||
@Entity(tableName = "HISTORY")
|
||||
class HistoryInfo() : BaseGalleryInfo() {
|
||||
class HistoryInfo(
|
||||
@Ignore
|
||||
val galleryInfo: GalleryInfo = BaseGalleryInfo(),
|
||||
) : BaseGalleryInfo(), AbstractGalleryInfo by galleryInfo {
|
||||
constructor() : this(galleryInfo = BaseGalleryInfo())
|
||||
|
||||
@ColumnInfo(name = "TIME")
|
||||
var time: Long = 0
|
||||
|
||||
@ColumnInfo(name = "FAVORITE_SLOT")
|
||||
override var favoriteSlot: Int = NOT_FAVORITED
|
||||
|
||||
constructor(galleryInfo: GalleryInfo) : this() {
|
||||
gid = galleryInfo.gid
|
||||
token = galleryInfo.token
|
||||
title = galleryInfo.title
|
||||
titleJpn = galleryInfo.titleJpn
|
||||
thumbKey = galleryInfo.thumbKey
|
||||
this.category = galleryInfo.category
|
||||
posted = galleryInfo.posted
|
||||
uploader = galleryInfo.uploader
|
||||
rating = galleryInfo.rating
|
||||
simpleTags = galleryInfo.simpleTags
|
||||
simpleLanguage = galleryInfo.simpleLanguage
|
||||
favoriteSlot = galleryInfo.favoriteSlot
|
||||
}
|
||||
}
|
||||
@@ -2,30 +2,23 @@ package com.hippo.ehviewer.dao
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.Ignore
|
||||
import com.hippo.ehviewer.client.data.AbstractGalleryInfo
|
||||
import com.hippo.ehviewer.client.data.BaseGalleryInfo
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo.Companion.LOCAL_FAVORITED
|
||||
|
||||
@Suppress("DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE")
|
||||
@Entity(tableName = "LOCAL_FAVORITES")
|
||||
class LocalFavoriteInfo() : BaseGalleryInfo() {
|
||||
class LocalFavoriteInfo(
|
||||
@Ignore
|
||||
val galleryInfo: GalleryInfo = BaseGalleryInfo(),
|
||||
) : BaseGalleryInfo(), AbstractGalleryInfo by galleryInfo {
|
||||
constructor() : this(galleryInfo = BaseGalleryInfo())
|
||||
|
||||
@ColumnInfo(name = "TIME")
|
||||
var time: Long = 0
|
||||
|
||||
constructor(galleryInfo: GalleryInfo) : this() {
|
||||
gid = galleryInfo.gid
|
||||
token = galleryInfo.token
|
||||
title = galleryInfo.title
|
||||
titleJpn = galleryInfo.titleJpn
|
||||
thumbKey = galleryInfo.thumbKey
|
||||
this.category = galleryInfo.category
|
||||
posted = galleryInfo.posted
|
||||
uploader = galleryInfo.uploader
|
||||
rating = galleryInfo.rating
|
||||
simpleTags = galleryInfo.simpleTags
|
||||
simpleLanguage = galleryInfo.simpleLanguage
|
||||
}
|
||||
|
||||
init {
|
||||
favoriteSlot = LOCAL_FAVORITED
|
||||
}
|
||||
@Ignore
|
||||
override var favoriteSlot = LOCAL_FAVORITED
|
||||
}
|
||||
Reference in new issue
Block a user