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