mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
Merge #ad529600: Fix account picker scroll and title visibility
nostr:nevent1qqs2655kqp2pe63dp0e9rlat20z3ljn9708savw26fyss28wsv0qt9qpz3mhxue69uhhyetvv9ujumn8d96zuer9wcjjv5kk PR-Author: greenart7c3 nostr:npub1w4uswmv6lu9yel005l3qgheysmr7tk9uvwluddznju3nuxalevvs2d0jr5
This commit is contained in:
@@ -82,6 +82,15 @@ fun AccountsBottomSheet(
|
|||||||
onClose()
|
onClose()
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(16.dp),
|
||||||
|
horizontalArrangement = Arrangement.Center,
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
|
) {
|
||||||
|
Text(stringResource(R.string.select_account), fontWeight = FontWeight.Bold)
|
||||||
|
}
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalDensity provides Density(
|
LocalDensity provides Density(
|
||||||
LocalDensity.current.density,
|
LocalDensity.current.density,
|
||||||
@@ -97,15 +106,6 @@ fun AccountsBottomSheet(
|
|||||||
.verticalScrollbar(scrollState)
|
.verticalScrollbar(scrollState)
|
||||||
.verticalScroll(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 ->
|
accounts.forEach { acc ->
|
||||||
// Load the cached Account off the main thread (decrypts once, then cached) so we
|
// 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
|
// can observe its name/picture StateFlows and refresh its metadata while the
|
||||||
|
|||||||
+3
-1
@@ -164,7 +164,9 @@ fun BunkerConnectRequestScreen(
|
|||||||
val scrollState = rememberScrollState()
|
val scrollState = rememberScrollState()
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
modifier = Modifier.fillMaxSize().padding(scaffoldPadding),
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.padding(scaffoldPadding),
|
||||||
bottomBar = {
|
bottomBar = {
|
||||||
Row(
|
Row(
|
||||||
Modifier
|
Modifier
|
||||||
|
|||||||
@@ -15,8 +15,10 @@ import androidx.compose.foundation.layout.height
|
|||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.CompareArrows
|
import androidx.compose.material.icons.automirrored.filled.CompareArrows
|
||||||
import androidx.compose.material.icons.filled.Check
|
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.fromHex
|
||||||
import com.greenart7c3.nostrsigner.ui.theme.previewAccount
|
import com.greenart7c3.nostrsigner.ui.theme.previewAccount
|
||||||
import com.greenart7c3.nostrsigner.ui.theme.primaryVariant
|
import com.greenart7c3.nostrsigner.ui.theme.primaryVariant
|
||||||
|
import com.greenart7c3.nostrsigner.ui.verticalScrollbar
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
|
|
||||||
@@ -206,17 +209,20 @@ fun AccountPickerRow(
|
|||||||
sheetState = sheetState,
|
sheetState = sheetState,
|
||||||
onDismissRequest = { sheetOpen = false },
|
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(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
.verticalScrollbar(scrollState)
|
||||||
|
.verticalScroll(scrollState)
|
||||||
.padding(horizontal = 12.dp, vertical = 8.dp),
|
.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 ->
|
accounts.forEachIndexed { index, acc ->
|
||||||
val name by acc.name.collectAsStateWithLifecycle()
|
val name by acc.name.collectAsStateWithLifecycle()
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
Reference in New Issue
Block a user