|
|
@ -46,18 +46,9 @@ data class SearchBook( |
|
|
|
@IgnoredOnParcel |
|
|
|
@IgnoredOnParcel |
|
|
|
override var tocHtml: String? = null |
|
|
|
override var tocHtml: String? = null |
|
|
|
|
|
|
|
|
|
|
|
override fun equals(other: Any?): Boolean { |
|
|
|
override fun equals(other: Any?) = other is SearchBook && other.bookUrl == bookUrl |
|
|
|
if (other is SearchBook) { |
|
|
|
|
|
|
|
if (other.bookUrl == bookUrl) { |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun hashCode(): Int { |
|
|
|
override fun hashCode() = bookUrl.hashCode() |
|
|
|
return bookUrl.hashCode() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun compareTo(other: SearchBook): Int { |
|
|
|
override fun compareTo(other: SearchBook): Int { |
|
|
|
return other.originOrder - this.originOrder |
|
|
|
return other.originOrder - this.originOrder |
|
|
@ -93,8 +84,7 @@ data class SearchBook( |
|
|
|
return "无最新章节" |
|
|
|
return "无最新章节" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun toBook(): Book { |
|
|
|
fun toBook() = Book( |
|
|
|
return Book( |
|
|
|
|
|
|
|
name = name, |
|
|
|
name = name, |
|
|
|
author = author, |
|
|
|
author = author, |
|
|
|
kind = kind, |
|
|
|
kind = kind, |
|
|
@ -114,4 +104,3 @@ data class SearchBook( |
|
|
|
this.tocUrl = this@SearchBook.tocUrl |
|
|
|
this.tocUrl = this@SearchBook.tocUrl |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|