OSDN Git Service

ノーティフィケーションをメインスレッドで送出するようにした
authormasakih <masakih@users.sourceforge.jp>
Sat, 23 Sep 2017 02:52:58 +0000 (11:52 +0900)
committermasakih <masakih@users.sourceforge.jp>
Sat, 23 Sep 2017 02:52:58 +0000 (11:52 +0900)
KCD/GuardShelterCommand.swift

index 3a21050..6be5a79 100644 (file)
@@ -145,6 +145,9 @@ final class GuardShelterCommand: JSONCommand {
     
     private func notify() {
         
-        NotificationCenter.default.post(name: .DidUpdateGuardEscape, object: self)
+        DispatchQueue.main.async {
+            
+            NotificationCenter.default.post(name: .DidUpdateGuardEscape, object: self)
+        }
     }
 }