Fix end sync control refreshing issue

Use syncAfter to work around.
This commit is contained in:
Bob Sun 2017-04-05 20:06:40 -07:00
parent bdf8683d4e
commit 347a6d7750
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -158,8 +158,11 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
} catch {
DispatchQueue.main.async {
SVProgressHUD.dismiss()
self.syncControl.endRefreshing()
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(800)) {
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
}
}
}
}