forked from shadowfacts/Tusker
Fix find instance VC requiring double dismiss
This commit is contained in:
parent
c7e39cb041
commit
8da89986df
|
@ -37,8 +37,15 @@ class FindInstanceViewController: InstanceSelectorTableViewController {
|
|||
// MARK: - Interaction
|
||||
|
||||
@objc func cancelButtonPressed() {
|
||||
// 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