From d35b958f1663a85b2a4f6dc46b5b46f34684ff2c Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 20 Oct 2022 23:45:33 +0800 Subject: [PATCH] SessionCtl // Disable reloading on hotkey-toggling cassette mode. - ... unless it is not loaded. --- Source/Modules/SessionCtl_Menu.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Modules/SessionCtl_Menu.swift b/Source/Modules/SessionCtl_Menu.swift index ed5272c4..e55d3865 100644 --- a/Source/Modules/SessionCtl_Menu.swift +++ b/Source/Modules/SessionCtl_Menu.swift @@ -6,6 +6,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. +import LangModelAssembly import NotifierUI import SSPreferences import UpdateSputnik @@ -249,7 +250,9 @@ extension SessionCtl { ? NSLocalizedString("NotificationSwitchON", comment: "") : NSLocalizedString("NotificationSwitchOFF", comment: "")) ) - LMMgr.loadCassetteData() + if !LMMgr.currentLM().currentCassette.isLoaded { + LMMgr.loadCassetteData() + } } @objc public func toggleSCPCTypingMode(_: Any? = nil) {