Skip to content

Commit 1f55069

Browse files
committed
Fix value bindings inconsistency and fix visionOS bug
1 parent e784945 commit 1f55069

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

Sources/CompactSlider/CompactSlider+OnChange.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ extension CompactSlider {
1111

1212
isValueChangingInternally = true
1313
defer {
14-
Task {
15-
isValueChangingInternally = false
16-
}
14+
isValueChangingInternally = false
1715
}
1816

1917
if progress.isMultipleValues {

Sources/CompactSlider/CompactSliderOption.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public enum CompactSliderOption: Hashable {
2727
case loopValues
2828
/// Allows the slider to expand the background and progress view when focused.
2929
case expandOnFocus(minScale: CGFloat)
30-
/// Allows tap to slide.
30+
/// Allows the slider to accept tap gestures to slide.
3131
case tapToSlide
3232
}
3333

Sources/CompactSlider/Treats/SystemSlider/SystemSlider.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public struct SystemSlider<Value: BinaryFloatingPoint>: View {
3737
@Binding var lowerValue: Value
3838
@Binding var upperValue: Value
3939
@Binding var values: [Value]
40-
@State private var visionOSHandleScaleEffect: CGFloat = 0.8
4140
let bounds: ClosedRange<Value>
4241
let step: Value
4342
let type: `Type`

Sources/CompactSlider/Treats/SystemSlider/SystemSliderHandleView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import SwiftUI
77

88
/// A "system" slider handle view.
99
public struct SystemSliderHandleView: View {
10+
@State private var visionOSHandleScaleEffect: CGFloat = 0.8
11+
1012
let configuration: CompactSliderStyleConfiguration
1113
let handleStyle: HandleStyle
1214
let progress: Double

0 commit comments

Comments
 (0)