Skip to content

Commit 1307494

Browse files
Bug Fix: JVM Screen not showing due to search controller disrupting nav flow
1 parent ab24cbf commit 1307494

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Natives/installer/ForgeInstallViewController.m

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -835,9 +835,19 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
835835
[NSString stringWithFormat:@"%@ installer will now run. After installation completes, you will need to restart the app.", self.currentVendor]);
836836

837837
LauncherNavigationController *navVC = (id)((UISplitViewController *)self.presentingViewController).viewControllers[1];
838-
[self dismissViewControllerAnimated:YES completion:^{
839-
[navVC enterModInstallerWithPath:outPath hitEnterAfterWindowShown:YES];
840-
}];
838+
839+
// Dismiss search controller first if it's active, then dismiss main view controller
840+
if (self.searchController.isActive) {
841+
[self.searchController dismissViewControllerAnimated:NO completion:^{
842+
[self dismissViewControllerAnimated:YES completion:^{
843+
[navVC enterModInstallerWithPath:outPath hitEnterAfterWindowShown:YES];
844+
}];
845+
}];
846+
} else {
847+
[self dismissViewControllerAnimated:YES completion:^{
848+
[navVC enterModInstallerWithPath:outPath hitEnterAfterWindowShown:YES];
849+
}];
850+
}
841851
});
842852
}];
843853

0 commit comments

Comments
 (0)