mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-04 02:05:16 +08:00
Fix some problems in CompoundButtonFactory
This commit is contained in:
@@ -38,8 +38,8 @@ fun CompoundButton.bind(data: PrefsData<Boolean>, initiate: CompoundButtonDataBi
|
|||||||
binder.applyChangesCallback = { ConfigData.putBoolean(data, it) }
|
binder.applyChangesCallback = { ConfigData.putBoolean(data, it) }
|
||||||
setOnCheckedChangeListener { button, isChecked ->
|
setOnCheckedChangeListener { button, isChecked ->
|
||||||
if (button.isPressed) {
|
if (button.isPressed) {
|
||||||
binder.changedCallback?.invoke(isChecked)
|
|
||||||
if (binder.isAutoApplyChanges) binder.applyChangesCallback?.invoke(isChecked)
|
if (binder.isAutoApplyChanges) binder.applyChangesCallback?.invoke(isChecked)
|
||||||
|
binder.changedCallback?.invoke(isChecked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user