manager: Simplify KPM display judgment in Home messages
This commit is contained in:
@@ -704,26 +704,24 @@ private fun InfoCard(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (!isSimpleMode) {
|
if (!isSimpleMode) {
|
||||||
if (lkmMode != true) {
|
// 根据showKpmInfo决定是否显示KPM信息
|
||||||
// 根据showKpmInfo决定是否显示KPM信息
|
if (lkmMode != true && !showKpmInfo && Natives.version >= Natives.MINIMAL_SUPPORTED_KPM) {
|
||||||
if (showKpmInfo && Natives.version >= Natives.MINIMAL_SUPPORTED_KPM) {
|
val displayVersion = if (systemInfo.kpmVersion.isEmpty() || systemInfo.kpmVersion.startsWith("Error")) {
|
||||||
val displayVersion = if (systemInfo.kpmVersion.isEmpty() || systemInfo.kpmVersion.startsWith("Error")) {
|
val statusText = if (Natives.isKPMEnabled()) {
|
||||||
val statusText = if (Natives.isKPMEnabled()) {
|
stringResource(R.string.kernel_patched)
|
||||||
stringResource(R.string.kernel_patched)
|
|
||||||
} else {
|
|
||||||
stringResource(R.string.kernel_not_enabled)
|
|
||||||
}
|
|
||||||
"${stringResource(R.string.not_supported)} ($statusText)"
|
|
||||||
} else {
|
} else {
|
||||||
"${stringResource(R.string.supported)} (${systemInfo.kpmVersion})"
|
stringResource(R.string.kernel_not_enabled)
|
||||||
}
|
}
|
||||||
|
"${stringResource(R.string.not_supported)} ($statusText)"
|
||||||
InfoCardItem(
|
} else {
|
||||||
stringResource(R.string.home_kpm_version),
|
"${stringResource(R.string.supported)} (${systemInfo.kpmVersion})"
|
||||||
displayVersion,
|
|
||||||
icon = Icons.Default.Archive
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InfoCardItem(
|
||||||
|
stringResource(R.string.home_kpm_version),
|
||||||
|
displayVersion,
|
||||||
|
icon = Icons.Default.Archive
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user