@@ -254,11 +254,13 @@ fun InstalledAppInfoDialog(
254254 }
255255 )
256256
257- // Expert Mode Repatch Dialog is rendered by HomeDialogs via homeViewModel.showExpertModeDialog.
258257 // Patch flow always starts with onTriggerPatchFlow → showPatchDialog → ApkAvailabilityDialog,
259258 // where the user picks the APK source. Expert mode dialog opens after APK selection.
259+ // We do NOT call onDismiss() here. InstalledAppInfoDialog stays open (hidden behind
260+ // ApkAvailabilityDialog) and is dismissed in HomeViewModel.proceedWithPatching() right
261+ // before navigating to PatcherScreen. This eliminates the flash of background that would
262+ // appear between closing this dialog and opening the next one
260263 fun handlePatchClick () {
261- onDismiss()
262264 onTriggerPatchFlow(viewModel.installedApp?.originalPackageName ? : return )
263265 }
264266
@@ -338,7 +340,6 @@ fun InstalledAppInfoDialog(
338340 buttonText = stringResource(R .string.patch),
339341 buttonIcon = Icons .Outlined .AutoFixHigh ,
340342 onClick = {
341- onDismiss()
342343 onTriggerPatchFlow(installedApp.originalPackageName)
343344 },
344345 isError = true
@@ -358,7 +359,6 @@ fun InstalledAppInfoDialog(
358359 buttonText = stringResource(R .string.patch),
359360 buttonIcon = Icons .Outlined .AutoFixHigh ,
360361 onClick = {
361- onDismiss()
362362 onTriggerPatchFlow(installedApp.originalPackageName)
363363 },
364364 isError = false
@@ -440,7 +440,6 @@ fun InstalledAppInfoDialog(
440440 buttonText = stringResource(R .string.patch),
441441 buttonIcon = Icons .Outlined .AutoFixHigh ,
442442 onClick = {
443- onDismiss()
444443 onTriggerPatchFlow(installedApp.originalPackageName)
445444 },
446445 isError = true ,
@@ -464,7 +463,6 @@ fun InstalledAppInfoDialog(
464463 buttonText = stringResource(R .string.patch),
465464 buttonIcon = Icons .Outlined .AutoFixHigh ,
466465 onClick = {
467- onDismiss()
468466 onTriggerPatchFlow(installedApp.originalPackageName)
469467 },
470468 isError = false ,
0 commit comments