Skip to content

Commit

Permalink
(android) Fix refund view scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
dpad85 committed May 21, 2024
1 parent 78ae137 commit 25bbd61
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ fun AmountInput(
colors = outlinedTextFieldColors(),
interactionSource = interactionSource,
shape = RoundedCornerShape(8.dp),
modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp, top = if (staticLabel != null) 14.dp else 0.dp)
modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp, top = if (staticLabel != null) 12.dp else 0.dp)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ fun FeerateSlider(
feerate: Satoshi,
onFeerateChange: (Satoshi) -> Unit,
mempoolFeerate: MempoolFeerate?,
enabled: Boolean
enabled: Boolean,
modifier: Modifier = Modifier,
) {
var showUnknownMempoolStateDialog by remember { mutableStateOf(false) }
Column {
Column(modifier = modifier) {
// the actual value of the feerate, in sat/vbyte
Text(text = stringResource(id = R.string.cpfp_feerate_value, feerate.sat), style = MaterialTheme.typography.body2)

Expand Down Expand Up @@ -73,13 +74,13 @@ fun FeerateSlider(
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.body1.copy(fontSize = 14.sp)) {
when {
feerate >= mempoolFeerate.fastest.feerate -> {
Text(text = stringResource(id = R.string.mempool_fastest), maxLines = 1)
Text(text = stringResource(id = R.string.mempool_fastest), maxLines = 1, modifier = Modifier.padding(vertical = 1.dp))
}
feerate >= mempoolFeerate.halfHour.feerate -> {
Text(text = stringResource(id = R.string.mempool_halfhour), maxLines = 1)
Text(text = stringResource(id = R.string.mempool_halfhour), maxLines = 1, modifier = Modifier.padding(vertical = 1.dp))
}
feerate >= mempoolFeerate.hour.feerate -> {
Text(text = stringResource(id = R.string.mempool_hour), maxLines = 1)
Text(text = stringResource(id = R.string.mempool_hour), maxLines = 1, modifier = Modifier.padding(vertical = 1.dp))
}
else -> {
TextWithIcon(text = stringResource(id = R.string.mempool_slow), icon = R.drawable.ic_alert_triangle, iconTint = MaterialTheme.colors.onSurface, space = 4.dp, maxLines = 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fun TextInput(
colors = if (errorMessage.isNullOrBlank()) outlinedTextFieldColors() else errorOutlinedTextFieldColors(),
shape = RoundedCornerShape(8.dp),
interactionSource = interactionSource,
modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp, top = if (staticLabel != null) 14.dp else 0.dp)
modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp, top = if (staticLabel != null) 12.dp else 0.dp)
)

staticLabel?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ fun MutualCloseView(
MVIView(CF::closeChannelsConfiguration) { model, postIntent ->
if (showScannerView) {
var scanView by remember { mutableStateOf<DecoratedBarcodeView?>(null) }
Box(
Modifier
.fillMaxWidth()
.fillMaxHeight()
) {
Box(Modifier.fillMaxSize()) {
ScannerView(
onScanViewBinding = { scanView = it },
onScannedText = {
Expand Down
Loading

0 comments on commit 25bbd61

Please sign in to comment.