Skip to content
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Mnemonic warning text transitions on reveal #857

### Changed
- Show end of address on Receive Bitcoin screen using middle ellipsis truncation #886
- Update funding screen: replace Advanced with Manual Setup, fix Use Other Wallet navigation to open amount entry, and add Fund Wallet button to no-funds dialog #885
- Updated design of the success screen in the manual channel setup flow #883
- Unified send flow with payment method switcher, details toggle, Lightning support for BIP21 payments, and improved fee rate defaults #863
Expand Down
12 changes: 10 additions & 2 deletions app/src/main/java/to/bitkit/ui/components/Text.kt
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,16 @@ fun BodyS(
modifier: Modifier = Modifier,
color: Color = MaterialTheme.colorScheme.primary,
textAlign: TextAlign = TextAlign.Start,
maxLines: Int = Int.MAX_VALUE,
overflow: TextOverflow = TextOverflow.Clip,
) {
BodyS(
text = AnnotatedString(text),
modifier = modifier,
color = color,
textAlign = textAlign,
maxLines = maxLines,
overflow = overflow,
modifier = modifier
)
Comment thread
jvsena42 marked this conversation as resolved.
}

Expand All @@ -269,14 +273,18 @@ fun BodyS(
modifier: Modifier = Modifier,
color: Color = MaterialTheme.colorScheme.primary,
textAlign: TextAlign = TextAlign.Start,
maxLines: Int = Int.MAX_VALUE,
overflow: TextOverflow = TextOverflow.Clip,
) {
Text(
text = text,
style = AppTextStyles.BodyS.merge(
color = color,
textAlign = textAlign,
),
modifier = modifier,
maxLines = maxLines,
overflow = overflow,
modifier = modifier
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
Expand Down Expand Up @@ -45,6 +43,7 @@ import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Devices.NEXUS_5
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -56,7 +55,6 @@ import kotlinx.coroutines.launch
import org.lightningdevkit.ldknode.ChannelDetails
import to.bitkit.R
import to.bitkit.ext.setClipboardText
import to.bitkit.ext.truncate
import to.bitkit.models.NodeLifecycleState
import to.bitkit.repositories.LightningState
import to.bitkit.repositories.WalletState
Expand Down Expand Up @@ -199,7 +197,7 @@ fun ReceiveQrScreen(
) {
SheetTopBar(stringResource(R.string.wallet__receive_bitcoin))
Column {
Spacer(Modifier.height(16.dp))
VerticalSpacer(16.dp)

// Tab row
CustomTabRowWithSpacing(
Expand All @@ -221,7 +219,7 @@ fun ReceiveQrScreen(
modifier = Modifier.padding(horizontal = 16.dp)
)

Spacer(Modifier.height(24.dp))
VerticalSpacer(24.dp)

// Content area (QR or Details) with LazyRow
LazyRow(
Expand Down Expand Up @@ -268,6 +266,7 @@ fun ReceiveQrScreen(
walletState.bip21,
walletState.onchainAddress,
)

else -> invoice
}

Expand All @@ -289,7 +288,7 @@ fun ReceiveQrScreen(
}
}

Spacer(Modifier.height(24.dp))
VerticalSpacer(24.dp)

AnimatedVisibility(visible = lightningState.nodeLifecycleState.isRunning()) {
val showCjitButton = showingCjitOnboarding && selectedTab == ReceiveTab.SPENDING
Expand Down Expand Up @@ -332,7 +331,7 @@ fun ReceiveQrScreen(
)
}

Spacer(Modifier.height(16.dp))
VerticalSpacer(16.dp)
}
}
}
Expand Down Expand Up @@ -366,7 +365,7 @@ private fun ReceiveQrView(
modifier = Modifier.weight(1f, fill = false)
)

Spacer(modifier = Modifier.height(16.dp))
VerticalSpacer(16.dp)
Row(
horizontalArrangement = Arrangement.spacedBy(16.dp),
verticalAlignment = Alignment.Top,
Expand Down Expand Up @@ -434,7 +433,7 @@ private fun ReceiveQrView(
modifier = Modifier.weight(1f)
)
}
Spacer(modifier = Modifier.height(16.dp))
VerticalSpacer(16.dp)
}
}

Expand Down Expand Up @@ -577,12 +576,14 @@ private fun CopyAddressCard(
.padding(24.dp)
) {
Caption13Up(text = title, color = Colors.White64)
Spacer(modifier = Modifier.height(16.dp))
VerticalSpacer(16.dp)
BodyS(
text = (body ?: address).truncate(32).uppercase(),
text = (body ?: address).uppercase(),
maxLines = 1,
overflow = TextOverflow.MiddleEllipsis,
modifier = testTag?.let { Modifier.testTag(it) } ?: Modifier
)
Spacer(modifier = Modifier.height(16.dp))
VerticalSpacer(16.dp)
Row(
horizontalArrangement = Arrangement.spacedBy(16.dp)
) {
Expand Down Expand Up @@ -862,7 +863,8 @@ private fun PreviewDetailsMode() {
tab = ReceiveTab.AUTO,
walletState = WalletState(
onchainAddress = "bcrt1qfserxgtuesul4m9zva56wzk849yf9l8rk4qy0l",
bolt11 = "lnbcrt500u1pn7umn7pp5x0s9lt9fwrff6rp70pz3guwnjgw97sjuv79...",
bolt11 = "lnbcrt500u1pn7umn7pp5x0s9lt9fwrff6rp70pz3guwnjgw97sjuv79vhx9n2ps8q6tcdehhxapqd9h8vmmfv" +
"djjqen0wgsyqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxq"
),
cjitInvoice = null,
onClickEditInvoice = {},
Expand Down
Loading