Skip to content

Commit 6d43033

Browse files
committed
fix(send): send success bottom navbar padding
1 parent 330b6e5 commit 6d43033

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

app/src/main/java/to/bitkit/repositories/WalletRepo.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import to.bitkit.ext.totalNextOutboundHtlcLimitSats
3131
import to.bitkit.models.AddressModel
3232
import to.bitkit.models.BalanceState
3333
import to.bitkit.models.NodeLifecycleState
34-
import to.bitkit.models.TransactionSpeed
3534
import to.bitkit.models.toDerivationPath
3635
import to.bitkit.services.CoreService
3736
import to.bitkit.utils.AddressChecker

app/src/main/java/to/bitkit/ui/sheets/NewTransactionSheet.kt

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Spacer
99
import androidx.compose.foundation.layout.fillMaxSize
1010
import androidx.compose.foundation.layout.fillMaxWidth
1111
import androidx.compose.foundation.layout.height
12+
import androidx.compose.foundation.layout.navigationBarsPadding
1213
import androidx.compose.foundation.layout.padding
1314
import androidx.compose.material3.ExperimentalMaterial3Api
1415
import androidx.compose.runtime.Composable
@@ -21,8 +22,6 @@ import androidx.compose.ui.layout.ContentScale
2122
import androidx.compose.ui.platform.testTag
2223
import androidx.compose.ui.res.painterResource
2324
import androidx.compose.ui.res.stringResource
24-
import androidx.compose.ui.semantics.semantics
25-
import androidx.compose.ui.semantics.testTagsAsResourceId
2625
import androidx.compose.ui.tooling.preview.Preview
2726
import androidx.compose.ui.unit.dp
2827
import com.airbnb.lottie.compose.LottieAnimation
@@ -73,6 +72,11 @@ fun NewTransactionSheet(
7372
onDetailClick = {
7473
appViewModel.onClickActivityDetail()
7574
},
75+
modifier = Modifier
76+
.sheetHeight(isModal = true)
77+
.gradientBackground()
78+
.navigationBarsPadding()
79+
.testTag("new_transaction_sheet")
7680
)
7781
}
7882
}
@@ -83,14 +87,9 @@ fun NewTransactionSheetView(
8387
details: NewTransactionSheetDetails,
8488
onCloseClick: () -> Unit,
8589
onDetailClick: () -> Unit,
90+
modifier: Modifier = Modifier,
8691
) {
87-
Box(
88-
modifier = Modifier
89-
.semantics { testTagsAsResourceId = true }
90-
.sheetHeight(isModal = true)
91-
.gradientBackground()
92-
.testTag("new_transaction_sheet")
93-
) {
92+
Box(modifier = modifier) {
9493
if (details.direction == NewTransactionSheetDirection.RECEIVED) {
9594
Image(
9695
painter = painterResource(R.drawable.coin_stack_5),
@@ -158,13 +157,7 @@ fun NewTransactionSheetView(
158157
onClick = { onDetailClick },
159158
modifier = Modifier
160159
.fillMaxWidth()
161-
.testTag(
162-
if (details.direction == NewTransactionSheetDirection.SENT) {
163-
"SendSuccess"
164-
} else {
165-
"ReceivedTransaction"
166-
}
167-
)
160+
.testTag("ReceivedTransaction")
168161
)
169162

170163
Spacer(modifier = Modifier.weight(1f))

app/src/main/java/to/bitkit/ui/sheets/SendSheet.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package to.bitkit.ui.sheets
22

33
import androidx.compose.foundation.layout.Column
4+
import androidx.compose.foundation.layout.fillMaxSize
45
import androidx.compose.foundation.layout.fillMaxWidth
56
import androidx.compose.foundation.layout.imePadding
7+
import androidx.compose.foundation.layout.navigationBarsPadding
68
import androidx.compose.runtime.Composable
79
import androidx.compose.runtime.LaunchedEffect
810
import androidx.compose.runtime.getValue
@@ -36,6 +38,7 @@ import to.bitkit.ui.screens.wallets.withdraw.WithdrawConfirmScreen
3638
import to.bitkit.ui.screens.wallets.withdraw.WithdrawErrorScreen
3739
import to.bitkit.ui.settings.support.SupportScreen
3840
import to.bitkit.ui.shared.modifiers.sheetHeight
41+
import to.bitkit.ui.shared.util.gradientBackground
3942
import to.bitkit.ui.utils.composableWithDefaultTransitions
4043
import to.bitkit.ui.utils.navigationWithDefaultTransitions
4144
import to.bitkit.viewmodels.AppViewModel
@@ -184,7 +187,12 @@ fun SendSheet(
184187
NewTransactionSheetView(
185188
details = sendDetail,
186189
onCloseClick = { appViewModel.hideSheet() },
187-
onDetailClick = { appViewModel.onClickSendDetail() }
190+
onDetailClick = { appViewModel.onClickSendDetail() },
191+
modifier = Modifier
192+
.fillMaxSize()
193+
.gradientBackground()
194+
.navigationBarsPadding()
195+
.testTag("SendSuccess")
188196
)
189197
}
190198
composableWithDefaultTransitions<SendRoute.WithdrawConfirm> {

0 commit comments

Comments
 (0)