add push to sync refresh

This commit is contained in:
Bob Sun 2017-02-11 01:50:57 +08:00
parent e05cc2708f
commit a55f4fb8bc
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -47,6 +47,11 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
SVProgressHUD.showProgress(Float(git_transfer_progress.pointee.received_objects)/Float(git_transfer_progress.pointee.total_objects), status: "Pull Remote Repository")
}
})
try PasswordStore.shared.pushRepository(transferProgressBlock: {(git_transfer_progress, stop) in
DispatchQueue.main.async {
SVProgressHUD.showProgress(Float(git_transfer_progress.pointee.received_objects)/Float(git_transfer_progress.pointee.total_objects), status: "Push Remote Repository")
}
})
DispatchQueue.main.async {
self.passwordEntities = PasswordStore.shared.fetchPasswordEntityCoreData()
self.reloadTableView(data: self.passwordEntities!)