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) }
|
var isActionBarShowed by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier.fillMaxSize()
|
||||||
.fillMaxSize()
|
|
||||||
.then(
|
|
||||||
if (isActionBarShowed) {
|
|
||||||
Modifier.clickable(
|
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
|
||||||
indication = null
|
|
||||||
) {
|
|
||||||
isActionBarShowed = false
|
|
||||||
}
|
|
||||||
} else Modifier
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
BackHandler(
|
BackHandler(
|
||||||
enabled = isActionBarShowed,
|
enabled = isActionBarShowed,
|
||||||
@@ -140,6 +129,19 @@ fun MainPage(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isActionBarShowed) {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.clickable(
|
||||||
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
|
indication = null
|
||||||
|
) {
|
||||||
|
isActionBarShowed = false
|
||||||
|
}
|
||||||
|
) { }
|
||||||
|
}
|
||||||
|
|
||||||
AnimatedVisibility(
|
AnimatedVisibility(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.BottomEnd)
|
.align(Alignment.BottomEnd)
|
||||||
|
|||||||
Reference in New Issue
Block a user