forked from omni/OmniCards
fix: fixed closing action bar
This commit is contained in:
@@ -101,18 +101,7 @@ fun MainPage(
|
||||
var isActionBarShowed by remember { mutableStateOf(false) }
|
||||
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.then(
|
||||
if (isActionBarShowed) {
|
||||
Modifier.clickable(
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = null
|
||||
) {
|
||||
isActionBarShowed = false
|
||||
}
|
||||
} else Modifier
|
||||
)
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) {
|
||||
BackHandler(
|
||||
enabled = isActionBarShowed,
|
||||
@@ -140,6 +129,19 @@ fun MainPage(
|
||||
}
|
||||
}
|
||||
|
||||
if (isActionBarShowed) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.clickable(
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = null
|
||||
) {
|
||||
isActionBarShowed = false
|
||||
}
|
||||
) { }
|
||||
}
|
||||
|
||||
AnimatedVisibility(
|
||||
modifier = Modifier
|
||||
.align(Alignment.BottomEnd)
|
||||
|
||||
Reference in New Issue
Block a user