You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
manager: fix hook mode status showing blank when Natives.getHookMode() is null
This commit is contained in:
@@ -622,12 +622,20 @@ private fun InfoCard(autoExpand: Boolean = false) {
|
|||||||
icon = painterResource(R.drawable.ic_ksu_next),
|
icon = painterResource(R.drawable.ic_ksu_next),
|
||||||
)
|
)
|
||||||
|
|
||||||
if (Natives.version >= Natives.MINIMAL_SUPPORTED_HOOK_MODE) {
|
if (ksuVersion != null &&
|
||||||
|
Natives.version >= Natives.MINIMAL_SUPPORTED_HOOK_MODE) {
|
||||||
|
|
||||||
|
val hookMode =
|
||||||
|
Natives.getHookMode()
|
||||||
|
.takeUnless { it.isNullOrBlank() }
|
||||||
|
?: stringResource(R.string.unavailable)
|
||||||
|
|
||||||
Spacer(Modifier.height(16.dp))
|
Spacer(Modifier.height(16.dp))
|
||||||
|
|
||||||
InfoCardItem(
|
InfoCardItem(
|
||||||
label = stringResource(R.string.hook_mode),
|
label = stringResource(R.string.hook_mode),
|
||||||
content = Natives.getHookMode() ?: stringResource(R.string.unavailable),
|
content = hookMode,
|
||||||
icon = Icons.Filled.Phishing,
|
icon = Icons.Filled.Phishing,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user