mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-28 20:53:03 +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 orientation = LocalConfiguration.current.orientation
|
||||
val currentDrawerState = scaffoldState.drawerState.currentValue
|
||||
LaunchedEffect(key1 = orientation) {
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE && currentDrawerState == DrawerValue.Closed) {
|
||||
scaffoldState.drawerState.close()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user