Skip to content

Commit

Permalink
Make the Apply Filter/ Sync Data button on the Multiselect Widget sti…
Browse files Browse the repository at this point in the history
…cky (#3629)

Signed-off-by: Lentumunai-Mark <[email protected]>
  • Loading branch information
Lentumunai-Mark authored Nov 21, 2024
1 parent f6e9faa commit 9293402
Showing 1 changed file with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,30 @@ fun MultiSelectBottomSheetView(
)
}
},
) {
bottomBar = {
if (syncLocationStateMap.isNotEmpty() && rootTreeNodes.isNotEmpty()) {
Button(
onClick = { onSelectionDone(multiSelectViewAction) },
modifier = Modifier.fillMaxWidth().padding(vertical = 16.dp, horizontal = 8.dp),
) {
Text(
text =
stringResource(
id =
when (multiSelectViewAction.first()) {
MultiSelectViewAction.SYNC_DATA -> R.string.sync_data
MultiSelectViewAction.FILTER_DATA -> R.string.apply_filter
},
)
.uppercase(),
modifier = Modifier.padding(8.dp),
)
}
}
},
) { paddingValues ->
Box(
modifier = Modifier.fillMaxSize().padding(it),
modifier = Modifier.fillMaxSize().padding(paddingValues),
contentAlignment = Alignment.TopCenter,
) {
if (isLoading.value == true) {
Expand Down Expand Up @@ -217,27 +238,6 @@ fun MultiSelectBottomSheetView(
}
}
}
item {
if (syncLocationStateMap.isNotEmpty() && rootTreeNodes.isNotEmpty()) {
Button(
onClick = { onSelectionDone(multiSelectViewAction) },
modifier = Modifier.fillMaxWidth().padding(vertical = 16.dp, horizontal = 8.dp),
) {
Text(
text =
stringResource(
id =
when (multiSelectViewAction.first()) {
MultiSelectViewAction.SYNC_DATA -> R.string.sync_data
MultiSelectViewAction.FILTER_DATA -> R.string.apply_filter
},
)
.uppercase(),
modifier = Modifier.padding(8.dp),
)
}
}
}
}
}
}
Expand Down

0 comments on commit 9293402

Please sign in to comment.