dc09-sensors2 #5

Merged
nm17 merged 28 commits from dc09-sensors2 into master 2023-06-18 13:15:53 +03:00
Showing only changes of commit 965533c8cc - Show all commits

View file

@ -57,7 +57,7 @@ fun SensorsPage(navController: NavController) {
var searchQuery by remember { mutableStateOf("") } var searchQuery by remember { mutableStateOf("") }
var searchActive by remember { mutableStateOf(false) } var searchActive by remember { mutableStateOf(false) }
var sortingShown by remember { mutableStateOf(false) } var sortingShow by remember { mutableStateOf(false) }
var sortingType by remember { mutableStateOf(SortingType.DISTANCE) } var sortingType by remember { mutableStateOf(SortingType.DISTANCE) }
val sortingTypes = remember { val sortingTypes = remember {
@ -70,7 +70,7 @@ fun SensorsPage(navController: NavController) {
) )
} }
var filterShown by remember { mutableStateOf(false) } var filterShow by remember { mutableStateOf(false) }
var filterMine by remember { mutableStateOf(false) } var filterMine by remember { mutableStateOf(false) }
val filterItems = remember { val filterItems = remember {
@ -130,12 +130,12 @@ fun SensorsPage(navController: NavController) {
modifier = Modifier.padding(horizontal = 8.dp), modifier = Modifier.padding(horizontal = 8.dp),
) { ) {
AssistChip( AssistChip(
onClick = { filterShown = true }, onClick = { filterShow = true },
label = { Text(text = stringResource(R.string.sensors_filter)) }, label = { Text(text = stringResource(R.string.sensors_filter)) },
) )
AssistChip( AssistChip(
onClick = { sortingShown = true }, onClick = { sortingShow = true },
label = { Text(text = stringResource(R.string.sensors_sorting)) }, label = { Text(text = stringResource(R.string.sensors_sorting)) },
) )
@ -148,8 +148,8 @@ fun SensorsPage(navController: NavController) {
} }
} }
if (filterShown) { if (filterShow) {
ModalBottomSheet(onDismissRequest = { filterShown = false }) { ModalBottomSheet(onDismissRequest = { filterShow = false }) {
Row( Row(
horizontalArrangement = Arrangement.Center, horizontalArrangement = Arrangement.Center,
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
@ -186,8 +186,8 @@ fun SensorsPage(navController: NavController) {
} }
} }
if (sortingShown) { if (sortingShow) {
ModalBottomSheet(onDismissRequest = { sortingShown = false }) { ModalBottomSheet(onDismissRequest = { sortingShow = false }) {
LazyColumn( LazyColumn(
modifier = Modifier.padding(horizontal = 4.dp), modifier = Modifier.padding(horizontal = 4.dp),
) { ) {