diff --git a/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt b/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt index 3fa28cd69..4b11ab39c 100644 --- a/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt +++ b/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.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 diff --git a/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditViewModel.kt b/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditViewModel.kt index ae8ba8025..281a0ac2d 100644 --- a/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditViewModel.kt @@ -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)