Refactor git repository model (#674)
- Create a new model class for operations of Git repository. - Refactor everything related with git. - Add unit tests for git functions.
This commit is contained in:
parent
5a1458e196
commit
a69c4d16b1
10 changed files with 421 additions and 181 deletions
|
|
@ -593,7 +593,7 @@ extension PasswordDetailTableViewController {
|
|||
handleError(error: AppError.other(message: "PasswordDoesNotExist"))
|
||||
return
|
||||
}
|
||||
let encryptedDataPath = PasswordStore.shared.storeURL.appendingPathComponent(passwordEntity.path)
|
||||
let encryptedDataPath = passwordEntity.fileURL(in: PasswordStore.shared.storeURL)
|
||||
|
||||
guard let encryptedData = try? Data(contentsOf: encryptedDataPath) else {
|
||||
handleError(error: AppError.other(message: "PasswordDoesNotExist"))
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ extension PasswordNavigationViewController {
|
|||
return false
|
||||
}
|
||||
} else if identifier == "addPasswordSegue" {
|
||||
guard PGPAgent.shared.isPrepared, PasswordStore.shared.storeRepository != nil else {
|
||||
guard PGPAgent.shared.isPrepared, PasswordStore.shared.gitRepository != nil else {
|
||||
Utils.alert(title: "CannotAddPassword".localize(), message: "MakeSurePgpAndGitProperlySet.".localize(), controller: self)
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue