manager: Add UMOUNT badge

This commit is contained in:
weishu
2023-06-04 09:52:45 +08:00
parent 990626cf7d
commit e969563df0
5 changed files with 22 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ object Natives {
val isSafeMode: Boolean
external get
external fun uidShouldUmount(uid: Int): Boolean
/**
* Get the profile of the given package.
* @param key usually the package name

View File

@@ -28,6 +28,7 @@ import coil.request.ImageRequest
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.launch
import me.weishu.kernelsu.Natives
import me.weishu.kernelsu.R
import me.weishu.kernelsu.ui.component.ConfirmDialog
import me.weishu.kernelsu.ui.component.SearchAppBar
@@ -139,6 +140,10 @@ private fun AppItem(
FlowRow {
if (app.allowSu) {
LabelText(label = "ROOT")
} else {
if (Natives.uidShouldUmount(app.uid)) {
LabelText(label = "UMOUNT")
}
}
if (app.hasCustomProfile) {
LabelText(label = "CUSTOM")