Skip to content

Commit 0001715

Browse files
committed
fix: position hw remove button and device image
1 parent 1db9453 commit 0001715

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

app/src/main/java/to/bitkit/ui/screens/wallets/HardwareWalletScreen.kt

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.padding
1313
import androidx.compose.foundation.layout.size
1414
import androidx.compose.foundation.layout.statusBars
1515
import androidx.compose.foundation.layout.windowInsetsPadding
16+
import androidx.compose.foundation.layout.wrapContentWidth
1617
import androidx.compose.foundation.lazy.LazyColumn
1718
import androidx.compose.material3.Icon
1819
import androidx.compose.runtime.Composable
@@ -128,9 +129,8 @@ private fun HardwareWalletContent(
128129
contentScale = ContentScale.Fit,
129130
modifier = Modifier
130131
.align(Alignment.TopEnd)
131-
.offset(x = 120.dp)
132-
.size(320.dp)
133-
.windowInsetsPadding(WindowInsets.statusBars.only(WindowInsetsSides.Vertical))
132+
.offset(x = 119.dp, y = 92.dp)
133+
.size(256.dp)
134134
)
135135
}
136136

@@ -194,16 +194,17 @@ private fun HardwareWalletContent(
194194
onEmptyActivityRowClick = {},
195195
showFooter = false,
196196
hardwareIds = hardwareIds,
197+
footerContent = {
198+
TertiaryButton(
199+
text = stringResource(R.string.hardware__remove_button, wallet.name),
200+
onClick = onRemoveClick,
201+
modifier = Modifier
202+
.wrapContentWidth()
203+
.padding(top = 8.dp)
204+
.testTag("RemoveHardwareWallet")
205+
)
206+
},
197207
)
198-
199-
item {
200-
TertiaryButton(
201-
text = stringResource(R.string.hardware__remove_button, wallet.name),
202-
onClick = onRemoveClick,
203-
modifier = Modifier.testTag("RemoveHardwareWallet")
204-
)
205-
}
206-
item { VerticalSpacer(120.dp) }
207208
}
208209
}
209210

app/src/main/java/to/bitkit/ui/screens/wallets/activity/components/ActivityListGrouped.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ fun LazyListScope.activityListGroupedItems(
170170
showFooter: Boolean = false,
171171
onAllActivityButtonClick: () -> Unit = {},
172172
hardwareIds: ImmutableSet<String> = persistentSetOf(),
173+
footerContent: (@Composable () -> Unit)? = null,
173174
) {
174175
if (!items.isNullOrEmpty()) {
175176
val groupedItems = groupActivityItems(items)
@@ -234,6 +235,9 @@ fun LazyListScope.activityListGroupedItems(
234235
)
235236
}
236237
}
238+
footerContent?.let { content ->
239+
item { content() }
240+
}
237241
item {
238242
VerticalSpacer(120.dp)
239243
}

0 commit comments

Comments
 (0)