forked from shadowfacts/Tusker
Fix find instance VC requiring double dismiss
This commit is contained in:
parent
c7e39cb041
commit
8da89986df
|
@ -37,7 +37,14 @@ class FindInstanceViewController: InstanceSelectorTableViewController {
|
||||||
// MARK: - Interaction
|
// MARK: - Interaction
|
||||||
|
|
||||||
@objc func cancelButtonPressed() {
|
@objc func cancelButtonPressed() {
|
||||||
dismiss(animated: true)
|
// when the search controller is active, dismiss exits it rather than dismissing ourself, so we have to dismiss twice
|
||||||
|
if searchController.isActive {
|
||||||
|
dismiss(animated: false) {
|
||||||
|
self.dismiss(animated: true)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dismiss(animated: true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue