Fix find instance VC requiring double dismiss

This commit is contained in:
Shadowfacts 2022-10-31 17:39:57 -04:00
parent c7e39cb041
commit 8da89986df
1 changed files with 8 additions and 1 deletions

View File

@ -37,7 +37,14 @@ class FindInstanceViewController: InstanceSelectorTableViewController {
// MARK: - Interaction
@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)
}
}
}