Cleanup GitServerSettingTableViewController

This commit is contained in:
Mingshen Sun 2019-11-30 17:37:09 -08:00
parent 9b304433fb
commit 902930ddfc
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
5 changed files with 156 additions and 131 deletions

View file

@ -28,13 +28,13 @@ class SSHKeySettingTableViewController: AutoCellHeightUITableViewController {
do {
try Data(contentsOf: privateKeyURL).write(to: URL(fileURLWithPath: SshKey.PRIVATE.getFileSharingPath()), options: .atomic)
try self.passwordStore.gitSSHKeyImportFromFileSharing()
SharedDefaults[.gitSSHKeySource] = "file"
SharedDefaults[.gitSSHKeySource] = .file
SVProgressHUD.showSuccess(withStatus: "Imported".localize())
SVProgressHUD.dismiss(withDelay: 1)
} catch {
Utils.alert(title: "Error".localize(), message: error.localizedDescription, controller: self, completion: nil)
}
SharedDefaults[.gitSSHKeySource] = "url"
SharedDefaults[.gitSSHKeySource] = .url
self.navigationController!.popViewController(animated: true)
}