File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1717 <key >CFBundleShortVersionString </key >
1818 <string >1.0.4 </string >
1919 <key >CFBundleVersion </key >
20- <string >529 </string >
20+ <string >531 </string >
2121 <key >LSRequiresIPhoneOS </key >
2222 <true />
2323 <key >CADisableMinimumFrameDurationOnPhone </key >
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ fun Switch(
118118 interactionSource = interactionSource,
119119 enabled = enabled
120120 )
121- .pointerInput(Unit ) {
121+ .pointerInput(checked ) {
122122 if (! enabled) return @pointerInput
123123 val touchSlop = 16f
124124 awaitEachGesture {
@@ -139,7 +139,8 @@ fun Switch(
139139 } while (event.changes.all { it.pressed })
140140
141141 if (validHorizontalDrag && ! isPressed && ! isDragged) {
142- onCheckedChange?.invoke(! checked)
142+ if (onCheckedChange == null ) return @awaitEachGesture
143+ onCheckedChange.invoke(! checked)
143144 hapticFeedback.performHapticFeedback(
144145 if (checked) HapticFeedbackType .ToggleOff
145146 else HapticFeedbackType .ToggleOn
You can’t perform that action at this time.
0 commit comments