perf: app list empty tip
Some checks failed
Build-Apk / build (push) Has been cancelled

This commit is contained in:
lisonge 2024-10-02 02:50:47 +08:00
parent 77f008dd42
commit 76b3049b36
3 changed files with 10 additions and 12 deletions

View File

@ -345,14 +345,9 @@ fun GlobalRuleExcludePage(subsItemId: Long, groupKey: Int) {
}
item {
Spacer(modifier = Modifier.height(EmptyHeight))
if (showAppInfos.isEmpty()) {
Column(
modifier = Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally,
) {
EmptyText(text = "暂无搜索结果")
Spacer(modifier = Modifier.height(EmptyHeight))
}
if (showAppInfos.isEmpty() && searchStr.isNotEmpty()) {
val hasShowAll = showSystemApp && showHiddenApp
EmptyText(text = if (hasShowAll) "暂无搜索结果" else "暂无搜索结果,请尝试修改筛选条件")
}
QueryPkgAuthCard()
}

View File

@ -284,9 +284,11 @@ fun SubsPage(
item {
Spacer(modifier = Modifier.height(EmptyHeight))
if (appAndConfigs.isEmpty()) {
EmptyText(
text = if (searchStr.isNotEmpty()) "暂无搜索结果" else "暂无规则",
)
EmptyText(text = if (searchStr.isNotEmpty()) {
if (showUninstallApp) "暂无搜索结果" else "暂无搜索结果,请尝试修改筛选条件"
} else {
"暂无规则"
})
} else if (editable) {
Spacer(modifier = Modifier.height(EmptyHeight))
}

View File

@ -366,7 +366,8 @@ fun useAppListPage(): ScaffoldExt {
item {
Spacer(modifier = Modifier.height(EmptyHeight))
if (orderedAppInfos.isEmpty() && searchStr.isNotEmpty()) {
EmptyText(text = "暂无搜索结果")
val hasShowAll = showSystemApp && showHiddenApp
EmptyText(text = if (hasShowAll) "暂无搜索结果" else "暂无搜索结果,请尝试修改筛选条件")
}
QueryPkgAuthCard()
}