File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
java/app/revanced/manager/ui/screen Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ import app.revanced.manager.ui.model.StepCategory
5555import app.revanced.manager.ui.viewmodel.PatcherViewModel
5656import app.revanced.manager.util.APK_MIMETYPE
5757import app.revanced.manager.util.EventEffect
58+ import app.revanced.manager.util.toast
5859
5960@OptIn(ExperimentalMaterial3Api ::class )
6061@Composable
@@ -76,11 +77,10 @@ fun PatcherScreen(
7677 var showInstallPicker by rememberSaveable { mutableStateOf(false ) }
7778 var showDismissConfirmationDialog by rememberSaveable { mutableStateOf(false ) }
7879
79- fun onPageBack () {
80- if (patcherSucceeded == null )
81- showDismissConfirmationDialog = true
82- else
83- onLeave()
80+ fun onPageBack () = when {
81+ patcherSucceeded == null -> showDismissConfirmationDialog = true
82+ viewModel.isInstalling -> context.toast(context.getString(R .string.patcher_install_in_progress))
83+ else -> onLeave()
8484 }
8585
8686 BackHandler (onBack = ::onPageBack)
Original file line number Diff line number Diff line change 318318 <string name =" patcher_notification_text" >Tap to return to the patcher</string >
319319 <string name =" patcher_stop_confirm_title" >Stop patcher</string >
320320 <string name =" patcher_stop_confirm_description" >Are you sure you want to stop the patching process?</string >
321+ <string name =" patcher_install_in_progress" >Installation is in progress. Please wait</string >
321322 <string name =" execute_patches" >Execute patches</string >
322323 <string name =" executing_patch" >Execute %s</string >
323324 <string name =" failed_to_execute_patch" >Failed to execute %s</string >
You can’t perform that action at this time.
0 commit comments