From 55d64a69ae5f9992bd4c097370de5f86767d6936 Mon Sep 17 00:00:00 2001 From: bjornoleh Date: Sat, 8 Jun 2024 21:56:43 +0200 Subject: [PATCH] PreferencesEditorDataFlow: commit Xcode auto formatting related to #232 --- .../Modules/PreferencesEditor/PreferencesEditorDataFlow.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FreeAPS/Sources/Modules/PreferencesEditor/PreferencesEditorDataFlow.swift b/FreeAPS/Sources/Modules/PreferencesEditor/PreferencesEditorDataFlow.swift index 54a74c5ef..1bbd54d6c 100644 --- a/FreeAPS/Sources/Modules/PreferencesEditor/PreferencesEditorDataFlow.swift +++ b/FreeAPS/Sources/Modules/PreferencesEditor/PreferencesEditorDataFlow.swift @@ -63,7 +63,9 @@ enum PreferencesEditor { settable?.set(keypath, value: value) case let (.decimal(keypath, minVal, maxVal), value as Decimal): let constrainedValue: Decimal - if let minValue = minVal, let minValueDecimal: Decimal = settable?.get(minValue), let maxValue = maxVal, let maxValueDecimal: Decimal = settable?.get(maxValue) { + if let minValue = minVal, let minValueDecimal: Decimal = settable?.get(minValue), let maxValue = maxVal, + let maxValueDecimal: Decimal = settable?.get(maxValue) + { constrainedValue = min(max(value, minValueDecimal), maxValueDecimal) } else if let minValue = minVal, let minValueDecimal: Decimal = settable?.get(minValue) { constrainedValue = max(value, minValueDecimal)