mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-06 22:43:24 +02:00
Preserve behaviour pre-fix(i.e if a user opened the drawer and landscaped by choice).
This commit is contained in:
@@ -77,8 +77,9 @@ fun MainScreen(
|
|||||||
val navState = navController.currentBackStackEntryAsState()
|
val navState = navController.currentBackStackEntryAsState()
|
||||||
|
|
||||||
val orientation = LocalConfiguration.current.orientation
|
val orientation = LocalConfiguration.current.orientation
|
||||||
|
val currentDrawerState = scaffoldState.drawerState.currentValue
|
||||||
LaunchedEffect(key1 = orientation) {
|
LaunchedEffect(key1 = orientation) {
|
||||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
if (orientation == Configuration.ORIENTATION_LANDSCAPE && currentDrawerState == DrawerValue.Closed) {
|
||||||
scaffoldState.drawerState.close()
|
scaffoldState.drawerState.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user