revert: fix: Remove the incorrect display of the KPM version and simplify the checking logic (#299)
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
@@ -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}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user