if api.endpoint == .port {
- if let t = data["api_combined_flag"].int {
-
- CombineType(rawValue: t).map(postNotification(withType:))
-
- } else {
-
- postNotification(withType: .cancel)
- }
-
+ handlePort()
return
}
.map(postNotification(withType:))
}
+ private func handlePort() {
+
+ if let t = data["api_combined_flag"].int {
+
+ CombineType(rawValue: t).map(postNotification(withType:))
+
+ } else {
+
+ postNotification(withType: .cancel)
+ }
+ }
+
private func postNotification(withType type: CombineType) {
let userInfo = [CombinedCommand.userInfoKey: type]