move showProgress method to main thread

This commit is contained in:
Bob Sun 2017-02-15 21:11:22 +08:00
parent 869f06e00f
commit 77945b11f8
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -113,7 +113,9 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
SVProgressHUD.show(withStatus: "Saving")
DispatchQueue.global(qos: .userInitiated).async {
PasswordStore.shared.update(passwordEntity: self.passwordEntity!, password: self.password!, progressBlock: { progress in
SVProgressHUD.showProgress(progress, status: "Encrypting")
DispatchQueue.main.async {
SVProgressHUD.showProgress(progress, status: "Encrypting")
}
})
DispatchQueue.main.async {
self.passwordEntity!.synced = false