From fb474e869da813f20f103bf09049e87fcb86ef88 Mon Sep 17 00:00:00 2001 From: Amrit Bhogal Date: Wed, 7 Jun 2023 15:47:26 -0700 Subject: [PATCH 1/3] macOS 13.3 support --- Whisky.xcodeproj/project.pbxproj | 4 ++-- Whisky/Views/AppDBView.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Whisky.xcodeproj/project.pbxproj b/Whisky.xcodeproj/project.pbxproj index c82acb756..d6cdd46ab 100644 --- a/Whisky.xcodeproj/project.pbxproj +++ b/Whisky.xcodeproj/project.pbxproj @@ -490,7 +490,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 13.4; MARKETING_VERSION = "pre-0.2.1"; PRODUCT_BUNDLE_IDENTIFIER = com.isaacmarovitz.Whisky; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -521,7 +521,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 13.4; MARKETING_VERSION = "pre-0.2.1"; PRODUCT_BUNDLE_IDENTIFIER = com.isaacmarovitz.Whisky; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Whisky/Views/AppDBView.swift b/Whisky/Views/AppDBView.swift index a659c55f9..dc12bebcb 100644 --- a/Whisky/Views/AppDBView.swift +++ b/Whisky/Views/AppDBView.swift @@ -17,7 +17,7 @@ struct AppDBView: View { EntryView(entry: entry) } .listStyle(.inset(alternatesRowBackgrounds: true)) - .onChange(of: search) { _, newValue in + .onChange(of: search) { newValue in if newValue.isEmpty { entries.removeAll() return From 2104c4e2504717abb57591cc2bb81cf1a520f7e9 Mon Sep 17 00:00:00 2001 From: Amrit Bhogal Date: Wed, 7 Jun 2023 15:49:04 -0700 Subject: [PATCH 2/3] Drop version req again --- Whisky.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Whisky.xcodeproj/project.pbxproj b/Whisky.xcodeproj/project.pbxproj index d6cdd46ab..5f8f394da 100644 --- a/Whisky.xcodeproj/project.pbxproj +++ b/Whisky.xcodeproj/project.pbxproj @@ -490,7 +490,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.4; + MACOSX_DEPLOYMENT_TARGET = 13.1; MARKETING_VERSION = "pre-0.2.1"; PRODUCT_BUNDLE_IDENTIFIER = com.isaacmarovitz.Whisky; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -521,7 +521,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.4; + MACOSX_DEPLOYMENT_TARGET = 13.1; MARKETING_VERSION = "pre-0.2.1"; PRODUCT_BUNDLE_IDENTIFIER = com.isaacmarovitz.Whisky; PRODUCT_NAME = "$(TARGET_NAME)"; From c7422ac86fee8621ebf3c0656bbfd578dbadfd13 Mon Sep 17 00:00:00 2001 From: Amrit Bhogal Date: Wed, 7 Jun 2023 15:52:39 -0700 Subject: [PATCH 3/3] Fixed all other occurences of `.onChange` --- Whisky/Views/Bottle Views/ConfigView.swift | 2 +- Whisky/Views/ProgramView.swift | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Whisky/Views/Bottle Views/ConfigView.swift b/Whisky/Views/Bottle Views/ConfigView.swift index cfc783444..759226548 100644 --- a/Whisky/Views/Bottle Views/ConfigView.swift +++ b/Whisky/Views/Bottle Views/ConfigView.swift @@ -59,7 +59,7 @@ struct ConfigView: View { } } .padding() - .onChange(of: windowsVersion) { _, newValue in + .onChange(of: windowsVersion) { newValue in canChangeWinVersion = false Task(priority: .userInitiated) { do { diff --git a/Whisky/Views/ProgramView.swift b/Whisky/Views/ProgramView.swift index 8041e6f18..7e3eaeb91 100644 --- a/Whisky/Views/ProgramView.swift +++ b/Whisky/Views/ProgramView.swift @@ -100,7 +100,7 @@ struct ProgramView: View { environment = program.settings.environment } - .onChange(of: environment) { _, newValue in + .onChange(of: environment) { newValue in program.settings.environment = newValue } } @@ -182,11 +182,11 @@ struct KeyItem: View { HStack { TextField("", text: $newKey) .textFieldStyle(.roundedBorder) - .onChange(of: newKey) { _, _ in + .onChange(of: newKey) { _ in newKey = String(newKey.filter { !$0.isWhitespace }) } .focused($isKeyFieldFocused) - .onChange(of: isKeyFieldFocused) { _, focus in + .onChange(of: isKeyFieldFocused) { focus in if !focus { if let entry = environment.removeValue(forKey: key) { environment[newKey] = entry @@ -197,7 +197,7 @@ struct KeyItem: View { TextField("", text: $value) .textFieldStyle(.roundedBorder) .focused($isValueFieldFocused) - .onChange(of: isValueFieldFocused) { _, focus in + .onChange(of: isValueFieldFocused) { focus in if !focus { environment[newKey] = value }