diff --git a/Core/Sources/HostApp/DebugView.swift b/Core/Sources/HostApp/DebugView.swift index cba2be49..1f210e96 100644 --- a/Core/Sources/HostApp/DebugView.swift +++ b/Core/Sources/HostApp/DebugView.swift @@ -27,6 +27,8 @@ final class DebugSettings: ObservableObject { var toastForTheReasonWhyXcodeInspectorNeedsToBeRestarted @AppStorage(\.observeToAXNotificationWithDefaultMode) var observeToAXNotificationWithDefaultMode + @AppStorage(\.useCloudflareDomainNameForLicenseCheck) + var useCloudflareDomainNameForLicenseCheck init() {} } @@ -126,6 +128,12 @@ struct DebugSettingsView: View { Text("Observe to AXNotification with default mode") } } + + Toggle( + isOn: $settings.useCloudflareDomainNameForLicenseCheck + ) { + Text("Use Cloudflare domain name for license check") + } } } .frame(maxWidth: .infinity) diff --git a/Core/Sources/HostApp/GeneralView.swift b/Core/Sources/HostApp/GeneralView.swift index 047ff149..f25a7fb8 100644 --- a/Core/Sources/HostApp/GeneralView.swift +++ b/Core/Sources/HostApp/GeneralView.swift @@ -244,7 +244,8 @@ struct GeneralSettingsView: View { @StateObject var settings = Settings() @Environment(\.updateChecker) var updateChecker - + @State var automaticallyCheckForUpdate: Bool? + var body: some View { Form { Toggle(isOn: $settings.quitXPCServiceOnXcodeAndAppQuit) { @@ -252,8 +253,11 @@ struct GeneralSettingsView: View { } Toggle(isOn: .init( - get: { updateChecker.automaticallyChecksForUpdates }, - set: { updateChecker.automaticallyChecksForUpdates = $0 } + get: { automaticallyCheckForUpdate ?? updateChecker.automaticallyChecksForUpdates }, + set: { + updateChecker.automaticallyChecksForUpdates = $0 + automaticallyCheckForUpdate = $0 + } )) { Text("Automatically Check for Update") } diff --git a/Pro b/Pro index a26917fd..43e54161 160000 --- a/Pro +++ b/Pro @@ -1 +1 @@ -Subproject commit a26917fd375041c5ddec59f1d4458c0fdd04df01 +Subproject commit 43e54161edb5893f0e89f2d9aaa4a8588f5ffe72 diff --git a/Tool/Sources/Preferences/Keys.swift b/Tool/Sources/Preferences/Keys.swift index a7588692..92daeb5f 100644 --- a/Tool/Sources/Preferences/Keys.swift +++ b/Tool/Sources/Preferences/Keys.swift @@ -616,5 +616,9 @@ public extension UserDefaultPreferenceKeys { var observeToAXNotificationWithDefaultMode: FeatureFlag { .init(defaultValue: false, key: "FeatureFlag-observeToAXNotificationWithDefaultMode") } + + var useCloudflareDomainNameForLicenseCheck: FeatureFlag { + .init(defaultValue: false, key: "FeatureFlag-UseCloudflareDomainNameForLicenseCheck") + } }