Change how initial refresh is triggered.
This commit is contained in:
parent
b3cf7ccdb7
commit
def48546a3
|
@ -421,6 +421,11 @@ final class CloudKitAccountDelegate: AccountDelegate {
|
|||
switch result {
|
||||
case .success(let externalID):
|
||||
account.externalID = externalID
|
||||
self.refreshAll(for: account) { result in
|
||||
if case .failure(let error) = result {
|
||||
os_log(.error, log: self.log, "Error while doing intial refresh: %@", error.localizedDescription)
|
||||
}
|
||||
}
|
||||
case .failure(let error):
|
||||
os_log(.error, log: self.log, "Error adding account container: %@", error.localizedDescription)
|
||||
}
|
||||
|
|
|
@ -35,8 +35,7 @@ class AccountsAddCloudKitWindowController: NSWindowController {
|
|||
}
|
||||
|
||||
@IBAction func create(_ sender: Any) {
|
||||
let account = AccountManager.shared.createAccount(type: .cloudKit)
|
||||
account.refreshAll(completion: { _ in })
|
||||
let _ = AccountManager.shared.createAccount(type: .cloudKit)
|
||||
hostWindow!.endSheet(window!, returnCode: NSApplication.ModalResponse.OK)
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,7 @@ class CloudKitAccountViewController: UITableViewController {
|
|||
}
|
||||
|
||||
@IBAction func add(_ sender: Any) {
|
||||
let account = AccountManager.shared.createAccount(type: .cloudKit)
|
||||
account.refreshAll(completion: { _ in })
|
||||
let _ = AccountManager.shared.createAccount(type: .cloudKit)
|
||||
dismiss(animated: true, completion: nil)
|
||||
delegate?.dismiss()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue