pull/35/head^2
kunfei 5 years ago
parent 63c1b8914e
commit 8a543ef3b7
  1. 2
      app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt
  2. 2
      app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditViewModel.kt

@ -25,7 +25,7 @@ class ReplaceEditDialog : DialogFragment(),
val dialog = ReplaceEditDialog()
id?.let {
val bundle = Bundle()
bundle.putLong("data", id)
bundle.putLong("id", id)
dialog.arguments = bundle
}
return dialog

@ -14,7 +14,7 @@ class ReplaceEditViewModel(application: Application) : BaseViewModel(application
fun initData(bundle: Bundle) {
execute {
replaceRuleData.value ?: let {
val id = bundle.getLong("data")
val id = bundle.getLong("id")
if (id > 0) {
App.db.replaceRuleDao().findById(id)?.let {
replaceRuleData.postValue(it)

Loading…
Cancel
Save