Updated on 2026-08-14
This commit is contained in:
parent
7d6e48a613
commit
648236f187
4 changed files with 19 additions and 16 deletions
|
|
@ -100,15 +100,18 @@ private fun TokenReceiveBottomSheetContent(content: TokenReceiveBottomSheetConfi
|
|||
@Composable
|
||||
private fun QrCodeContent(content: TokenReceiveBottomSheetConfig, onAddressChange: (AddressModel) -> Unit) {
|
||||
val qrCodes = rememberQrPainters(content.addresses.map(AddressModel::value))
|
||||
val pagerState = rememberPagerState()
|
||||
val pageCount = content.addresses.count()
|
||||
val pagerState = rememberPagerState(
|
||||
initialPage = 0,
|
||||
initialPageOffsetFraction = 0f,
|
||||
) {
|
||||
content.addresses.count()
|
||||
}
|
||||
|
||||
LaunchedEffect(key1 = pagerState.currentPage) {
|
||||
onAddressChange.invoke(content.addresses[pagerState.currentPage])
|
||||
}
|
||||
|
||||
HorizontalPager(
|
||||
pageCount = pageCount,
|
||||
state = pagerState,
|
||||
) { currentPage ->
|
||||
Column(
|
||||
|
|
@ -142,7 +145,7 @@ private fun QrCodeContent(content: TokenReceiveBottomSheetConfig, onAddressChang
|
|||
}
|
||||
}
|
||||
|
||||
if (pageCount > 1) {
|
||||
if (pagerState.pageCount > 1) {
|
||||
val indicatorState = rememberLazyListState()
|
||||
val selectedColor = TangemTheme.colors.icon.primary1
|
||||
val unselectedColor = TangemTheme.colors.icon.informative
|
||||
|
|
@ -153,7 +156,7 @@ private fun QrCodeContent(content: TokenReceiveBottomSheetConfig, onAddressChang
|
|||
horizontalArrangement = Arrangement.Center,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
repeat(pageCount) { iteration ->
|
||||
repeat(pagerState.pageCount) { iteration ->
|
||||
item(key = iteration) {
|
||||
val color = if (pagerState.currentPage == iteration) {
|
||||
selectedColor
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ internal class DefaultWalletRouter(private val reduxNavController: ReduxNavContr
|
|||
* next element is wallet screen entry.
|
||||
* If backstack contains only NavGraph entry and wallet screen entry then we close the wallet fragment.
|
||||
*/
|
||||
if (navController.backQueue.size == BACKSTACK_ENTRY_COUNT_TO_CLOSE_WALLET_SCREEN) {
|
||||
if (navController.currentBackStack.value.size == BACKSTACK_ENTRY_COUNT_TO_CLOSE_WALLET_SCREEN) {
|
||||
if (screen != null) {
|
||||
reduxNavController.navigate(action = NavigationAction.PopBackTo(screen))
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ kotlin = "1.8.21"
|
|||
# endregion Classpath
|
||||
|
||||
# region AndroidX
|
||||
androidxActivityCompose = "1.5.0"
|
||||
androidxActivityCompose = "1.8.0"
|
||||
androidxAppCompat = "1.5.1"
|
||||
androidxBrowser = "1.4.0"
|
||||
androidxConstraintLayout = "2.1.4"
|
||||
|
|
@ -24,16 +24,16 @@ androidx-palette = "1.0.0"
|
|||
|
||||
# region Compose
|
||||
compose-compiler = "1.4.7"
|
||||
compose-runtime = "1.4.3"
|
||||
compose-foundation = "1.4.3"
|
||||
compose-material = "1.4.3"
|
||||
compose-material3 = "1.1.0"
|
||||
compose-runtime = "1.5.3"
|
||||
compose-foundation = "1.5.3"
|
||||
compose-material = "1.5.3"
|
||||
compose-material3 = "1.1.2"
|
||||
compose-constraint = "1.0.1"
|
||||
compose-navigation = "2.5.3"
|
||||
compose-navigation = "2.7.4"
|
||||
compose-accompanist = "0.30.1"
|
||||
compose-paging = "3.2.0"
|
||||
compose-paging = "3.2.1"
|
||||
compose-reorderable = "0.9.6"
|
||||
compoese-lifecycle-runtime = "2.6.1"
|
||||
compoese-lifecycle-runtime = "2.6.2"
|
||||
# endregion Compose
|
||||
|
||||
# region Other libraries
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ internal object AppConfig {
|
|||
const val versionCode = 1
|
||||
const val versionName = "1.0.0-SNAPSHOT"
|
||||
const val minSdkVersion = 23
|
||||
const val targetSdkVersion = 33
|
||||
const val compileSdkVersion = 33
|
||||
const val targetSdkVersion = 34
|
||||
const val compileSdkVersion = 34
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue