Fixes scrollable drawer for all screen sizes
This commit is contained in:
@@ -42,6 +42,7 @@ import androidx.compose.foundation.text.KeyboardActions
|
|||||||
import androidx.compose.foundation.text.KeyboardOptions
|
import androidx.compose.foundation.text.KeyboardOptions
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
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.Delete
|
||||||
import androidx.compose.material.icons.filled.Send
|
import androidx.compose.material.icons.filled.Send
|
||||||
import androidx.compose.material3.AlertDialog
|
import androidx.compose.material3.AlertDialog
|
||||||
@@ -139,7 +140,9 @@ fun DrawerContent(
|
|||||||
drawerContainerColor = MaterialTheme.colorScheme.background,
|
drawerContainerColor = MaterialTheme.colorScheme.background,
|
||||||
drawerTonalElevation = 0.dp,
|
drawerTonalElevation = 0.dp,
|
||||||
) {
|
) {
|
||||||
Column {
|
Column(
|
||||||
|
Modifier.fillMaxHeight().verticalScroll(rememberScrollState()),
|
||||||
|
) {
|
||||||
ProfileContent(
|
ProfileContent(
|
||||||
baseAccountUser = accountViewModel.account.userProfile(),
|
baseAccountUser = accountViewModel.account.userProfile(),
|
||||||
modifier = profileContentHeaderModifier,
|
modifier = profileContentHeaderModifier,
|
||||||
@@ -159,16 +162,15 @@ fun DrawerContent(
|
|||||||
)
|
)
|
||||||
|
|
||||||
ListContent(
|
ListContent(
|
||||||
modifier =
|
modifier = Modifier.fillMaxWidth(),
|
||||||
Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.weight(1f),
|
|
||||||
drawerState,
|
drawerState,
|
||||||
openSheet,
|
openSheet,
|
||||||
accountViewModel,
|
accountViewModel,
|
||||||
nav,
|
nav,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
|
||||||
BottomContent(
|
BottomContent(
|
||||||
accountViewModel.account.userProfile(),
|
accountViewModel.account.userProfile(),
|
||||||
drawerState,
|
drawerState,
|
||||||
@@ -348,7 +350,7 @@ fun SendButton(onClick: () -> Unit) {
|
|||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Send,
|
imageVector = Icons.AutoMirrored.Filled.Send,
|
||||||
null,
|
null,
|
||||||
modifier = Size20Modifier,
|
modifier = Size20Modifier,
|
||||||
tint = MaterialTheme.colorScheme.placeholderText,
|
tint = MaterialTheme.colorScheme.placeholderText,
|
||||||
@@ -460,12 +462,7 @@ fun ListContent(
|
|||||||
val proxyPort = remember { mutableStateOf(accountViewModel.account.proxyPort.toString()) }
|
val proxyPort = remember { mutableStateOf(accountViewModel.account.proxyPort.toString()) }
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
|
|
||||||
Column(
|
Column(modifier) {
|
||||||
modifier =
|
|
||||||
modifier
|
|
||||||
.fillMaxHeight()
|
|
||||||
.verticalScroll(rememberScrollState()),
|
|
||||||
) {
|
|
||||||
NavigationRow(
|
NavigationRow(
|
||||||
title = stringResource(R.string.profile),
|
title = stringResource(R.string.profile),
|
||||||
icon = Route.Profile.icon,
|
icon = Route.Profile.icon,
|
||||||
|
|||||||
Reference in New Issue
Block a user