use ObjectiveGit instead of SwiftGit2
This commit is contained in:
parent
7f58e2e649
commit
1b0f8fcb05
7 changed files with 74 additions and 32 deletions
|
|
@ -7,21 +7,25 @@
|
|||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftGit2
|
||||
import Result
|
||||
import SVProgressHUD
|
||||
|
||||
extension PasswordsTableViewController: UISearchResultsUpdating {
|
||||
func updateSearchResults(for searchController: UISearchController) {
|
||||
filterContentForSearchText(searchText: searchController.searchBar.text!)
|
||||
}
|
||||
}
|
||||
|
||||
class PasswordsTableViewController: UITableViewController {
|
||||
private var passwordEntities: [PasswordEntity]?
|
||||
var filteredPasswordEntities = [PasswordEntity]()
|
||||
let searchController = UISearchController(searchResultsController: nil)
|
||||
|
||||
@IBAction func refreshPasswords(_ sender: UIBarButtonItem) {
|
||||
DispatchQueue.global(qos: .userInitiated).async {
|
||||
if PasswordStore.shared.pullRepository() {
|
||||
print("pull success")
|
||||
self.passwordEntities = PasswordStore.shared.fetchPasswordEntityCoreData()
|
||||
self.tableView.reloadData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
passwordEntities = PasswordStore.shared.fetchPasswordEntityCoreData()
|
||||
|
|
@ -87,3 +91,10 @@ class PasswordsTableViewController: UITableViewController {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
extension PasswordsTableViewController: UISearchResultsUpdating {
|
||||
func updateSearchResults(for searchController: UISearchController) {
|
||||
filterContentForSearchText(searchText: searchController.searchBar.text!)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue