Skip to content

Commit

Permalink
Fixes scrollable drawer for all screen sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorpamplona committed Jun 10, 2024
1 parent eea8b99 commit 2e96834
Showing 1 changed file with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.Send
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Send
import androidx.compose.material3.AlertDialog
Expand Down Expand Up @@ -139,7 +140,9 @@ fun DrawerContent(
drawerContainerColor = MaterialTheme.colorScheme.background,
drawerTonalElevation = 0.dp,
) {
Column {
Column(
Modifier.fillMaxHeight().verticalScroll(rememberScrollState()),
) {
ProfileContent(
baseAccountUser = accountViewModel.account.userProfile(),
modifier = profileContentHeaderModifier,
Expand All @@ -159,16 +162,15 @@ fun DrawerContent(
)

ListContent(
modifier =
Modifier
.fillMaxWidth()
.weight(1f),
modifier = Modifier.fillMaxWidth(),
drawerState,
openSheet,
accountViewModel,
nav,
)

Spacer(modifier = Modifier.weight(1f))

BottomContent(
accountViewModel.account.userProfile(),
drawerState,
Expand Down Expand Up @@ -348,7 +350,7 @@ fun SendButton(onClick: () -> Unit) {
onClick = onClick,
) {
Icon(
imageVector = Icons.Default.Send,
imageVector = Icons.AutoMirrored.Filled.Send,
null,
modifier = Size20Modifier,
tint = MaterialTheme.colorScheme.placeholderText,
Expand Down Expand Up @@ -460,12 +462,7 @@ fun ListContent(
val proxyPort = remember { mutableStateOf(accountViewModel.account.proxyPort.toString()) }
val context = LocalContext.current

Column(
modifier =
modifier
.fillMaxHeight()
.verticalScroll(rememberScrollState()),
) {
Column(modifier) {
NavigationRow(
title = stringResource(R.string.profile),
icon = Route.Profile.icon,
Expand Down

0 comments on commit 2e96834

Please sign in to comment.