fix(nav): make the navigation drawer scrollable
The ModalDrawerSheet stacked all items in a non-scrolling column. A signed-in session adds My account, Notifications, and the three player groups (11 nav items + sign-out + change-server), which overflows the drawer height on shorter screens or larger display-size / font-scale settings — clipping the lower entries (Notifications among them) so they can't be reached. Wrap the drawer content in a verticalScroll column so every entry is reachable regardless of screen height. Verified on-device: a signed-in player sees Home…My houses + Sign out + Change server, with Notifications present and its screen reachable. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
*/
|
||||
package com.runicgateway.app.ui
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
import androidx.compose.material.icons.filled.Menu
|
||||
@@ -134,6 +137,11 @@ fun RunicApp(
|
||||
selectedTextColor = MaterialTheme.colorScheme.onSecondaryContainer,
|
||||
unselectedTextColor = MaterialTheme.colorScheme.onSurface,
|
||||
)
|
||||
// Scroll the drawer: a signed-in session adds Account, Notifications, and
|
||||
// the player groups, and the full list overflows a phone's drawer height —
|
||||
// without this the lower entries (Notifications included) are clipped and
|
||||
// unreachable. See RunicGateway M10.
|
||||
Column(Modifier.verticalScroll(rememberScrollState())) {
|
||||
Spacer(Modifier.height(12.dp))
|
||||
Text(
|
||||
text = brand?.name?.takeIf { it.isNotBlank() } ?: stringResource(R.string.app_name),
|
||||
@@ -190,6 +198,7 @@ fun RunicApp(
|
||||
modifier = Modifier.padding(NavigationDrawerItemDefaults.ItemPadding),
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
) {
|
||||
Scaffold(
|
||||
|
||||
Reference in New Issue
Block a user