diff --git a/Sources/CareKitEssentials/Cards/watchOS/DigitalCrown/DigitalCrownView.swift b/Sources/CareKitEssentials/Cards/watchOS/DigitalCrown/DigitalCrownView.swift index 96ba0cb6..a70ffe82 100644 --- a/Sources/CareKitEssentials/Cards/watchOS/DigitalCrown/DigitalCrownView.swift +++ b/Sources/CareKitEssentials/Cards/watchOS/DigitalCrown/DigitalCrownView.swift @@ -28,7 +28,7 @@ public struct DigitalCrownView: View { public var body: some View { CardView { VStack( - alignment: .leading, + alignment: .leading, spacing: style.dimension.directionalInsets1.top ) { if !(header is EmptyView) { diff --git a/Sources/CareKitEssentials/Cards/watchOS/DigitalCrown/DigitalCrownViewModel.swift b/Sources/CareKitEssentials/Cards/watchOS/DigitalCrown/DigitalCrownViewModel.swift index 94ed8db5..f294b678 100644 --- a/Sources/CareKitEssentials/Cards/watchOS/DigitalCrown/DigitalCrownViewModel.swift +++ b/Sources/CareKitEssentials/Cards/watchOS/DigitalCrown/DigitalCrownViewModel.swift @@ -34,7 +34,11 @@ open class DigitalCrownViewModel: CardViewModel { } open var isButtonDisabled: Bool { - value == event.outcomeFirstValue + guard let currentDouble = value.doubleValue, + let originalDouble = event.outcomeValueDouble else { + return false + } + return Int(currentDouble) == Int(originalDouble) } open var valueForButton: String {