Add server editing and deletion
This commit is contained in:
@@ -47,12 +47,16 @@ final class AppContext {
|
||||
|
||||
func selectServer(index: UInt32) throws {
|
||||
try core.selectServer(index: index)
|
||||
reloadAfterServerChange()
|
||||
}
|
||||
|
||||
func reloadAfterServerChange() {
|
||||
let replacements: [(Int, UIViewController)] = [
|
||||
(0, HomeViewController(context: self)),
|
||||
(1, RepositoriesViewController(context: self, mode: .issues)),
|
||||
(2, RepositoriesViewController(context: self, mode: .commits)),
|
||||
(1, repositoryRoot(mode: .issues)),
|
||||
(2, repositoryRoot(mode: .commits)),
|
||||
(3, PullsViewController(context: self)),
|
||||
(4, RepositoriesViewController(context: self, mode: .milestones)),
|
||||
(4, repositoryRoot(mode: .milestones)),
|
||||
]
|
||||
for (index, root) in replacements {
|
||||
navigationControllers[index].setViewControllers([root], animated: false)
|
||||
|
||||
Reference in New Issue
Block a user