Skip to content

Commit

Permalink
[WASH-931] Fix DispatchGroup typo after merge
Browse files Browse the repository at this point in the history
- Adds back in DispatchGroup waiting to block main
  thread execution for API requests that was inadvertantly
  removed after a merge
  • Loading branch information
Matthew Rhea committed Aug 4, 2021
1 parent db86b0d commit 5cee46a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ios/Classes/SwiftFlutterPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ public class SwiftFlutterPlugin: NSObject, Flutter.FlutterPlugin {
result(FlutterError(code: "READ_RECORD", message: "Read data record failed", details: nil))
}
}
group.leave()
}
group.wait()
}

// MARK: SHARE
Expand All @@ -116,13 +118,15 @@ public class SwiftFlutterPlugin: NSObject, Flutter.FlutterPlugin {
group.enter()
DispatchQueue.global().async {
client.share(type: recordType, readerId: UUID(uuidString: readerID)!) { (shareResult) in
shareResult.analysis(ifSuccess: { voidResultFromShare in
shareResult.analysis(ifSuccess: { (voidResultFromShare) in
result(nil)
}) { error in
result(FlutterError(code: "SHARE_ERROR", message: error.description, details: nil))
}
}
group.leave()
}
group.wait()
}

func emptyActionHandler(loginAction: E3db.IdentityLoginAction) -> [String:String] {
Expand Down

0 comments on commit 5cee46a

Please sign in to comment.