pull/94/head
kunfei 5 years ago
parent ff1c9979d6
commit aa49a88b76
  1. 11
      app/src/main/java/io/legado/app/data/entities/Book.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookViewModel.kt

@ -57,6 +57,17 @@ data class Book(
return isLocalBook() && originName.endsWith(".txt", true)
}
override fun equals(other: Any?): Boolean {
if (other is Book) {
return other.bookUrl == bookUrl
}
return false
}
override fun hashCode(): Int {
return bookUrl.hashCode()
}
@Ignore
@IgnoredOnParcel
override var variableMap: HashMap<String, String>? = null

@ -11,7 +11,7 @@ class ArrangeBookViewModel(application: Application) : BaseViewModel(application
fun deleteBook(vararg book: Book) {
execute {
App.db.bookDao().delete()
App.db.bookDao().delete(*book)
}
}

Loading…
Cancel
Save