manager: fixed buggy bottombar with a neat workaround

This commit is contained in:
rifsxd
2025-04-28 00:14:29 +06:00
parent babae3b2ad
commit 114a07a440

View File

@@ -77,7 +77,7 @@ class MainActivity : ComponentActivity() {
val snackBarHostState = remember { SnackbarHostState() }
val currentDestination = navController.currentBackStackEntryAsState()?.value?.destination
val showBottomBar = when (currentDestination?.route) {
val showBottomBar = Platform.isAlive && when (currentDestination?.route) {
FlashScreenDestination.route -> false // Hide for FlashScreenDestination
ExecuteModuleActionScreenDestination.route -> false // Hide for ExecuteModuleActionScreen
else -> true
@@ -125,7 +125,7 @@ class MainActivity : ComponentActivity() {
private fun BottomBar(navController: NavHostController) {
val navigator = navController.rememberDestinationsNavigator()
val isManager = Natives.becomeManager(ksuApp.packageName)
val fullFeatured = isManager && !Natives.requireNewKernel() && rootAvailable() && Platform.isAlive
val fullFeatured = isManager && !Natives.requireNewKernel() && rootAvailable()
NavigationBar(
tonalElevation = 8.dp,
windowInsets = WindowInsets.systemBars.union(WindowInsets.displayCutout).only(