SearchBar handle the back press when it is active, there is no need to handle the event here.
This commit is contained in:
parent
97491c3f3f
commit
2cb056711d
1 changed files with 2 additions and 6 deletions
|
|
@ -83,12 +83,8 @@ fun ChangeRolesView(
|
|||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
val updatedOnBackPressed by rememberUpdatedState(newValue = onBackPressed)
|
||||
BackHandler {
|
||||
if (state.isSearchActive) {
|
||||
state.eventSink(ChangeRolesEvent.ToggleSearchActive)
|
||||
} else {
|
||||
state.eventSink(ChangeRolesEvent.Exit)
|
||||
}
|
||||
BackHandler(enabled = !state.isSearchActive) {
|
||||
state.eventSink(ChangeRolesEvent.Exit)
|
||||
}
|
||||
|
||||
Box(modifier = modifier) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue