diff --git a/app/src/main/java/com/fankes/apperrorstracking/data/factory/CompoundButtonFactory.kt b/app/src/main/java/com/fankes/apperrorstracking/data/factory/CompoundButtonFactory.kt index f043111..7c03964 100644 --- a/app/src/main/java/com/fankes/apperrorstracking/data/factory/CompoundButtonFactory.kt +++ b/app/src/main/java/com/fankes/apperrorstracking/data/factory/CompoundButtonFactory.kt @@ -38,8 +38,8 @@ fun CompoundButton.bind(data: PrefsData, initiate: CompoundButtonDataBi binder.applyChangesCallback = { ConfigData.putBoolean(data, it) } setOnCheckedChangeListener { button, isChecked -> if (button.isPressed) { - binder.changedCallback?.invoke(isChecked) if (binder.isAutoApplyChanges) binder.applyChangesCallback?.invoke(isChecked) + binder.changedCallback?.invoke(isChecked) } } }