diff --git a/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Flash.kt b/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Flash.kt index 4694c6ac..7bac2f37 100644 --- a/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Flash.kt +++ b/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Flash.kt @@ -172,8 +172,8 @@ fun FlashScreen(navigator: DestinationsNavigator, flashIt: FlashIt) { ) }, floatingActionButton = { - if (showFloatAction) { - // Reboot button (bottom left) + if (flashIt is FlashIt.FlashModules && (flashing == FlashingStatus.SUCCESS)) { + // Reboot button for modules flashing ExtendedFloatingActionButton( onClick = { scope.launch { @@ -186,6 +186,28 @@ fun FlashScreen(navigator: DestinationsNavigator, flashIt: FlashIt) { text = { Text(text = stringResource(R.string.reboot)) } ) } + + if (flashIt is FlashIt.FlashModules && (flashing == FlashingStatus.FAILED)) { + // Close button for modules flashing + ExtendedFloatingActionButton( + text = { Text(text = stringResource(R.string.close)) }, + icon = { Icon(Icons.Filled.Close, contentDescription = null) }, + onClick = { + navigator.popBackStack() + } + ) + } + + if (flashIt is FlashIt.FlashBoot && (flashing == FlashingStatus.SUCCESS || flashing == FlashingStatus.FAILED)) { + // Close button for LKM flashing + ExtendedFloatingActionButton( + text = { Text(text = stringResource(R.string.close)) }, + icon = { Icon(Icons.Filled.Close, contentDescription = null) }, + onClick = { + navigator.popBackStack() + } + ) + } }, contentWindowInsets = WindowInsets.safeDrawing, snackbarHost = { SnackbarHost(hostState = snackBarHost) }