From ad48cb0d526602020ad5a851f8e7ab494e951748 Mon Sep 17 00:00:00 2001 From: greenart7c3 Date: Fri, 28 Aug 2026 12:13:17 -0300 Subject: [PATCH] Fix account picker scroll and title visibility --- .../ui/actions/AccountsBottomSheet.kt | 18 +++++++++--------- .../components/BunkerConnectRequestScreen.kt | 4 +++- .../ui/components/LoginWithPubKey.kt | 18 ++++++++++++------ 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/ui/actions/AccountsBottomSheet.kt b/app/src/main/java/com/greenart7c3/nostrsigner/ui/actions/AccountsBottomSheet.kt index 2582c8ca..d3c74baf 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/ui/actions/AccountsBottomSheet.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/ui/actions/AccountsBottomSheet.kt @@ -82,6 +82,15 @@ fun AccountsBottomSheet( onClose() }, ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(16.dp), + horizontalArrangement = Arrangement.Center, + verticalAlignment = Alignment.CenterVertically, + ) { + Text(stringResource(R.string.select_account), fontWeight = FontWeight.Bold) + } CompositionLocalProvider( LocalDensity provides Density( LocalDensity.current.density, @@ -97,15 +106,6 @@ fun AccountsBottomSheet( .verticalScrollbar(scrollState) .verticalScroll(scrollState), ) { - Row( - modifier = Modifier - .fillMaxWidth() - .padding(16.dp), - horizontalArrangement = Arrangement.Center, - verticalAlignment = Alignment.CenterVertically, - ) { - Text(stringResource(R.string.select_account), fontWeight = FontWeight.Bold) - } accounts.forEach { acc -> // Load the cached Account off the main thread (decrypts once, then cached) so we // can observe its name/picture StateFlows and refresh its metadata while the diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/BunkerConnectRequestScreen.kt b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/BunkerConnectRequestScreen.kt index a0d5d94c..ee20b8ac 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/BunkerConnectRequestScreen.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/BunkerConnectRequestScreen.kt @@ -164,7 +164,9 @@ fun BunkerConnectRequestScreen( val scrollState = rememberScrollState() Scaffold( - modifier = Modifier.fillMaxSize().padding(scaffoldPadding), + modifier = Modifier + .fillMaxSize() + .padding(scaffoldPadding), bottomBar = { Row( Modifier diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/LoginWithPubKey.kt b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/LoginWithPubKey.kt index 521a48f0..5670fd5f 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/LoginWithPubKey.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/ui/components/LoginWithPubKey.kt @@ -15,8 +15,10 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width +import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.CompareArrows import androidx.compose.material.icons.filled.Check @@ -68,6 +70,7 @@ import com.greenart7c3.nostrsigner.ui.theme.ThemePreviews import com.greenart7c3.nostrsigner.ui.theme.fromHex import com.greenart7c3.nostrsigner.ui.theme.previewAccount import com.greenart7c3.nostrsigner.ui.theme.primaryVariant +import com.greenart7c3.nostrsigner.ui.verticalScrollbar import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf @@ -206,17 +209,20 @@ fun AccountPickerRow( sheetState = sheetState, onDismissRequest = { sheetOpen = false }, ) { + Text( + text = stringResource(R.string.select_account), + fontWeight = FontWeight.Medium, + fontSize = 15.sp, + modifier = Modifier.padding(start = 16.dp, top = 8.dp, bottom = 8.dp), + ) + val scrollState = rememberScrollState() Column( modifier = Modifier .fillMaxWidth() + .verticalScrollbar(scrollState) + .verticalScroll(scrollState) .padding(horizontal = 12.dp, vertical = 8.dp), ) { - Text( - text = stringResource(R.string.select_account), - fontWeight = FontWeight.Medium, - fontSize = 15.sp, - modifier = Modifier.padding(start = 4.dp, bottom = 8.dp), - ) accounts.forEachIndexed { index, acc -> val name by acc.name.collectAsStateWithLifecycle() Row(