mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-06 14:07:32 +00:00
put code that will call UI onto the main thread with DispatchQueue.main.async
This commit is contained in:
parent
1750da8100
commit
a595b8b72d
1 changed files with 3 additions and 1 deletions
|
|
@ -421,7 +421,9 @@ class LexicalModelPickerViewController: UITableViewController, UIAlertViewDelega
|
|||
func listCompletionHandler(lexicalModels: [LexicalModel]?, error: Error?) -> Void {
|
||||
if let error = error {
|
||||
log.info("Failed to fetch lexical model list for "+language.id+". error: "+(error as! String))
|
||||
self.lexicalModelDownloadFailed(LexicalModelDownloadFailedNotification(lmOrLanguageID: language.id, error: error))
|
||||
DispatchQueue.main.async {
|
||||
self.lexicalModelDownloadFailed(LexicalModelDownloadFailedNotification(lmOrLanguageID: language.id, error: error))
|
||||
}
|
||||
} else if nil == lexicalModels {
|
||||
log.info("No lexical models available for language \(language.id) (nil)")
|
||||
} else if 0 == lexicalModels?.count {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue