From 9190e13aeb8eb089cb250554699384915b914e67 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 1 May 2023 20:06:00 +0800 Subject: [PATCH] Installer // Remove isMonterey() for now. --- Installer/AppDelegate.swift | 6 ------ Installer/AppDelegate_Extension.swift | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Installer/AppDelegate.swift b/Installer/AppDelegate.swift index 593958a5..f089c231 100644 --- a/Installer/AppDelegate.swift +++ b/Installer/AppDelegate.swift @@ -34,12 +34,6 @@ public let kTargetFullBinPartialPath = urlTargetFullBinPartial.path public let kTranslocationRemovalTickInterval: TimeInterval = 0.5 public let kTranslocationRemovalDeadline: TimeInterval = 60.0 -public var isMonterey: Bool { - guard #unavailable(macOS 13) else { return false } - guard #available(macOS 12, *) else { return false } - return true -} - @NSApplicationMain @objc(AppDelegate) class AppDelegate: NSWindowController, NSApplicationDelegate { diff --git a/Installer/AppDelegate_Extension.swift b/Installer/AppDelegate_Extension.swift index 8a97ecc3..c8d2de1d 100644 --- a/Installer/AppDelegate_Extension.swift +++ b/Installer/AppDelegate_Extension.swift @@ -165,7 +165,7 @@ extension AppDelegate { // 這樣可以尊重某些使用者「僅使用簡體中文」或「僅使用繁體中文」的習慣。 mainInputSourceEnabled = mainInputSourceEnabled || isActivated } - if isActivated, !isMonterey { return } + if isActivated { return } // WARNING: macOS 12 may return false positives, hence forced activation. if neta.activate() { NSLog("Input method enabled: \(imeIdentifier)") @@ -184,7 +184,7 @@ extension AppDelegate { ) ntfPostInstall.addButton(withTitle: NSLocalizedString("OK", comment: "")) } else { - if !mainInputSourceEnabled, !isMonterey { + if !mainInputSourceEnabled { ntfPostInstall.messageText = NSLocalizedString("Warning", comment: "") ntfPostInstall.informativeText = NSLocalizedString( "Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources.",