kopia lustrzana https://github.com/vitorpamplona/amethyst
Preserve behaviour pre-fix(i.e if a user opened the drawer and landscaped by choice).
rodzic
6875fdc4d0
commit
d921eb6138
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue