Skip to content

Commit

Permalink
perf: app list empty tip
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Oct 1, 2024
1 parent 77f008d commit 76b3049
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
11 changes: 3 additions & 8 deletions app/src/main/kotlin/li/songe/gkd/ui/GlobalRuleExcludePage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/kotlin/li/songe/gkd/ui/SubsPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/kotlin/li/songe/gkd/ui/home/AppListPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 76b3049

Please sign in to comment.