Repo // Async certain NSAlert window when necessary.

This commit is contained in:
ShikiSuen 2022-09-08 21:15:17 +08:00
parent 8f7d5a8a2a
commit 45ef33c645
1 changed files with 8 additions and 6 deletions

View File

@ -138,12 +138,14 @@ public enum IME {
), ),
mgrLangModel.dataFolderPath(isDefaultFolder: false) mgrLangModel.dataFolderPath(isDefaultFolder: false)
) )
let alert = NSAlert() DispatchQueue.main.async {
alert.messageText = NSLocalizedString("Unable to create the user phrase file.", comment: "") let alert = NSAlert()
alert.informativeText = content alert.messageText = NSLocalizedString("Unable to create the user phrase file.", comment: "")
alert.addButton(withTitle: NSLocalizedString("OK", comment: "")) alert.informativeText = content
alert.runModal() alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
NSApp.setActivationPolicy(.accessory) alert.runModal()
NSApp.setActivationPolicy(.accessory)
}
return false return false
} }
return true return true