Skip to content

Commit 068a16a

Browse files
committed
Rename and split filter types
1 parent 6071c93 commit 068a16a

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

app/src/main/java/com/OxGames/Pluvia/ui/enums/AppFilter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ enum class AppFilter(
4343
),
4444
SHARED(
4545
code = 0x20,
46-
displayText = "Shared",
46+
displayText = "Family",
4747
icon = Icons.Default.Diversity3,
4848
),
4949
// ALPHABETIC(

app/src/main/java/com/OxGames/Pluvia/ui/screen/library/components/LibraryBottomSheet.kt

+25-9
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,34 @@ fun LibraryBottomSheet(
3232
.fillMaxWidth()
3333
.padding(horizontal = 32.dp),
3434
) {
35-
Text(text = "Filters", style = MaterialTheme.typography.titleLarge)
36-
37-
Spacer(modifier = Modifier.height(18.dp))
35+
Text(text = "App Type", style = MaterialTheme.typography.titleLarge)
36+
Spacer(modifier = Modifier.height(8.dp))
37+
FlowRow {
38+
AppFilter.entries.forEach { appFilter ->
39+
// TODO properly fix this (and the one below)
40+
if (appFilter.code !in listOf(0x01, 0x20)) {
41+
FlowFilterChip(
42+
onClick = { onFilterChanged(appFilter) },
43+
label = { Text(text = appFilter.displayText) },
44+
selected = selectedFilters.contains(appFilter),
45+
leadingIcon = { Icon(imageVector = appFilter.icon, contentDescription = null) },
46+
)
47+
}
48+
}
49+
}
3850

51+
Text(text = "App Status", style = MaterialTheme.typography.titleLarge)
52+
Spacer(modifier = Modifier.height(8.dp))
3953
FlowRow {
4054
AppFilter.entries.forEach { appFilter ->
41-
FlowFilterChip(
42-
onClick = { onFilterChanged(appFilter) },
43-
label = { Text(text = appFilter.displayText) },
44-
selected = selectedFilters.contains(appFilter),
45-
leadingIcon = { Icon(imageVector = appFilter.icon, contentDescription = null) },
46-
)
55+
if (appFilter.code in listOf(0x01, 0x20)) {
56+
FlowFilterChip(
57+
onClick = { onFilterChanged(appFilter) },
58+
label = { Text(text = appFilter.displayText) },
59+
selected = selectedFilters.contains(appFilter),
60+
leadingIcon = { Icon(imageVector = appFilter.icon, contentDescription = null) },
61+
)
62+
}
4763
}
4864
}
4965

0 commit comments

Comments
 (0)