From dee2b34a8a3efd09cf02f6c10d58aaef817401df Mon Sep 17 00:00:00 2001 From: 1024jp <1024jp@wolfrosch.com> Date: Tue, 9 Jun 2026 22:29:51 +0900 Subject: [PATCH] Prefer using #available --- .../ControlUI/SettingsWindow/SettingsWindow.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Packages/MacUI/Sources/ControlUI/SettingsWindow/SettingsWindow.swift b/Packages/MacUI/Sources/ControlUI/SettingsWindow/SettingsWindow.swift index 287fbcf98..e84b093cb 100644 --- a/Packages/MacUI/Sources/ControlUI/SettingsWindow/SettingsWindow.swift +++ b/Packages/MacUI/Sources/ControlUI/SettingsWindow/SettingsWindow.swift @@ -32,11 +32,10 @@ final class SettingsWindow: NSWindow { override var canBecomeMain: Bool { - if ProcessInfo.processInfo.operatingSystemVersion.majorVersion == 26 { - true // workaround ShareLink issue (2025-08, macOS 26, fixed in macOS 27, FB19287270) - } else { - false - } + // workaround ShareLink issue (2025-08, macOS 26, fixed in macOS 27, FB19287270) + guard #available(macOS 27, *) else { return true } + + return false }