diff --git a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt index 40b0b6317..f679ff10e 100644 --- a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt +++ b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt @@ -32,6 +32,19 @@ data class SearchBook( var originOrder: Int = 0 ) : Parcelable, BaseBook { + override fun equals(other: Any?): Boolean { + if (other is SearchBook) { + if (other.bookUrl == bookUrl) { + return true + } + } + return false + } + + override fun hashCode(): Int { + return bookUrl.hashCode() + } + @IgnoredOnParcel @Ignore override var variableMap: HashMap? = null