revert: fix: Remove the incorrect display of the KPM version and simplify the checking logic (#299)

This commit is contained in:
Seyud
2025-07-29 20:26:19 +08:00
committed by GitHub
parent b1ee07fee1
commit ea68183f80
2 changed files with 2 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ fun BottomBar(navController: NavHostController) {
) { ) {
BottomBarDestination.entries.forEach { destination -> BottomBarDestination.entries.forEach { destination ->
if (destination == BottomBarDestination.Kpm) { if (destination == BottomBarDestination.Kpm) {
if (kpmVersion.isNotEmpty() && !showKpmInfo && Natives.version >= Natives.MINIMAL_SUPPORTED_KPM) { if (kpmVersion.isNotEmpty() && !kpmVersion.startsWith("Error") && !showKpmInfo && Natives.version >= Natives.MINIMAL_SUPPORTED_KPM) {
if (!isFullFeatured && destination.rootRequired) return@forEach if (!isFullFeatured && destination.rootRequired) return@forEach
val isCurrentDestOnBackStack by navController.isRouteOnBackStackAsState(destination.direction) val isCurrentDestOnBackStack by navController.isRouteOnBackStackAsState(destination.direction)
NavigationBarItem( NavigationBarItem(

View File

@@ -88,7 +88,7 @@ object AppData {
val version = getKpmVersion() val version = getKpmVersion()
if (version.isEmpty()) "" else version if (version.isEmpty()) "" else version
} catch (e: Exception) { } catch (e: Exception) {
"" "Error: ${e.message}"
} }
} }