From bd9a5c6c45f6d0de613f24742a9429f081206d0f Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 14 Nov 2022 11:36:42 +0800 Subject: [PATCH] SessionCtl // Move some tasks from setValue() to activateServer(). --- Source/Modules/SessionCtl_Core.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Modules/SessionCtl_Core.swift b/Source/Modules/SessionCtl_Core.swift index 5722c009..e71226e4 100644 --- a/Source/Modules/SessionCtl_Core.swift +++ b/Source/Modules/SessionCtl_Core.swift @@ -194,6 +194,7 @@ extension SessionCtl { inputHandler.ensureKeyboardParser() Self.theShiftKeyDetector.alsoToggleWithLShift = PrefMgr.shared.togglingAlphanumericalModeWithLShift + Self.isVerticalTyping = isVerticalTyping if #available(macOS 10.15, *) { if isASCIIMode, PrefMgr.shared.disableShiftTogglingAlphanumericalMode { isASCIIMode = false } @@ -233,9 +234,7 @@ extension SessionCtl { _ = tag // 防止格式整理工具毀掉與此對應的參數。 _ = sender // 防止格式整理工具毀掉與此對應的參數。 DispatchQueue.main.async { [self] in - let mostRecentInputMode = PrefMgr.shared.mostRecentInputMode - inputMode = .init(rawValue: value as? String ?? mostRecentInputMode) ?? .imeModeNULL - Self.isVerticalTyping = isVerticalTyping + inputMode = .init(rawValue: value as? String ?? PrefMgr.shared.mostRecentInputMode) ?? .imeModeNULL } }