pull/1814/head
kunfei 3 years ago
parent 46fe025711
commit 5a937cd442
  1. 6
      app/src/main/java/io/legado/app/ui/replace/ReplaceRuleViewModel.kt

@ -28,7 +28,7 @@ class ReplaceRuleViewModel(application: Application) : BaseViewModel(application
}
}
fun topSelect(rules: LinkedHashSet<ReplaceRule>) {
fun topSelect(rules: List<ReplaceRule>) {
execute {
var minOrder = appDb.replaceRuleDao.minOrder - rules.size
rules.forEach {
@ -45,7 +45,7 @@ class ReplaceRuleViewModel(application: Application) : BaseViewModel(application
}
}
fun bottomSelect(rules: LinkedHashSet<ReplaceRule>) {
fun bottomSelect(rules: List<ReplaceRule>) {
execute {
var maxOrder = appDb.replaceRuleDao.maxOrder
rules.forEach {
@ -83,7 +83,7 @@ class ReplaceRuleViewModel(application: Application) : BaseViewModel(application
}
}
fun delSelection(rules: LinkedHashSet<ReplaceRule>) {
fun delSelection(rules: List<ReplaceRule>) {
execute {
appDb.replaceRuleDao.delete(*rules.toTypedArray())
}

Loading…
Cancel
Save