From 11182403f53ee4a2941c28f958d75be5c506d562 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 6 Feb 2020 22:11:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/data/entities/ReplaceRule.kt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/data/entities/ReplaceRule.kt b/app/src/main/java/io/legado/app/data/entities/ReplaceRule.kt index 269325e5d..8744ce2cb 100644 --- a/app/src/main/java/io/legado/app/data/entities/ReplaceRule.kt +++ b/app/src/main/java/io/legado/app/data/entities/ReplaceRule.kt @@ -24,4 +24,17 @@ data class ReplaceRule( var isRegex: Boolean = true, @ColumnInfo(name = "sortOrder") var order: Int = 0 -) : Parcelable \ No newline at end of file +) : Parcelable { + + + override fun equals(other: Any?): Boolean { + if (other is ReplaceRule) { + return other.id == id + } + return super.equals(other) + } + + override fun hashCode(): Int { + return id.hashCode() + } +} \ No newline at end of file