diff --git a/app/build.gradle b/app/build.gradle index a2dd53110f..e2ee3c1d4f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -218,7 +218,7 @@ dependencies { implementation "androidx.core:core-splashscreen:1.0.1" //AppWidgets - implementation 'androidx.glance:glance-appwidget:1.0.0' + implementation 'androidx.glance:glance-appwidget:1.1.1' // Room def room_version = '2.6.1' @@ -271,7 +271,7 @@ dependencies { implementation("io.github.alexzhirkevich:qrose:1.0.1") // WorkManager Kotlin - def work_version = "2.9.0" + def work_version = "2.10.0" implementation "androidx.work:work-runtime-ktx:$work_version" // WorkManager RxJava2 support implementation "androidx.work:work-rxjava2:$work_version" @@ -309,8 +309,8 @@ dependencies { implementation 'com.twitter.twittertext:twitter-text:3.1.0' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-rx2:1.7.3' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-rx2:1.8.1' // UI modules @@ -319,7 +319,7 @@ dependencies { implementation project(':components:chartview') // Integration with activities - implementation 'androidx.activity:activity-compose:1.9.0' + implementation 'androidx.activity:activity-compose:1.9.3' // Compose Material Design implementation "androidx.compose.material:material:$compose_version" // Animations @@ -333,7 +333,7 @@ dependencies { implementation "androidx.compose.runtime:runtime-livedata:$compose_version" - def coil_version = "2.5.0" + def coil_version = "2.6.0" implementation "io.coil-kt:coil-compose:$coil_version" implementation "io.coil-kt:coil-svg:$coil_version" implementation("io.coil-kt:coil-gif:$coil_version") diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/core/App.kt b/app/src/main/java/io/horizontalsystems/bankwallet/core/App.kt index c554ac5b19..af88305552 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/core/App.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/core/App.kt @@ -545,18 +545,18 @@ class App : CoreApp(), WorkConfiguration.Provider, ImageLoaderFactory { ).signingInfo when { - signingInfo.hasMultipleSigners() -> signingInfo.apkContentsSigners // Send all with apkContentsSigners - else -> signingInfo.signingCertificateHistory // Send one with signingCertificateHistory + signingInfo?.hasMultipleSigners() == true -> signingInfo.apkContentsSigners // Send all with apkContentsSigners + else -> signingInfo?.signingCertificateHistory // Send one with signingCertificateHistory } } else { packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES).signatures } - signatureList.map { + signatureList?.map { val digest = MessageDigest.getInstance("SHA") digest.update(it.toByteArray()) digest.digest() - } + } ?: emptyList() } catch (e: Exception) { // Handle error emptyList() diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/backupalert/BackupAlert.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/backupalert/BackupAlert.kt index 268b421b77..f941b06973 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/backupalert/BackupAlert.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/backupalert/BackupAlert.kt @@ -13,7 +13,7 @@ import kotlinx.coroutines.delay fun BackupAlert(navController: NavController) { val viewModel = viewModel() - LifecycleResumeEffect { + LifecycleResumeEffect(Unit) { viewModel.resume() onPauseOrDispose { diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/market/overview/ui/MarketsHorizontalCards.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/market/overview/ui/MarketsHorizontalCards.kt index c607e75c6a..4092ef7a28 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/market/overview/ui/MarketsHorizontalCards.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/market/overview/ui/MarketsHorizontalCards.kt @@ -1,6 +1,5 @@ package io.horizontalsystems.bankwallet.modules.market.overview.ui -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.PageSize @@ -11,7 +10,6 @@ import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.dp @Composable -@OptIn(ExperimentalFoundationApi::class) fun MarketsHorizontalCards( pageCount: Int, pageContent: @Composable() (PagerScope.(page: Int) -> Unit) @@ -19,7 +17,7 @@ fun MarketsHorizontalCards( val pagerState = rememberPagerState(pageCount = { pageCount }) HorizontalPager( state = pagerState, - beyondBoundsPageCount = 1, + beyondViewportPageCount = 1, pageSize = object : PageSize { override fun Density.calculateMainAxisPageSize( availableSpace: Int, diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/qrscanner/QRScannerActivity.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/qrscanner/QRScannerActivity.kt index 40bf3610a8..ff3bcc74f1 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/qrscanner/QRScannerActivity.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/qrscanner/QRScannerActivity.kt @@ -212,7 +212,7 @@ private fun ScannerView(onScan: (String) -> Unit) { } } AndroidView(factory = { barcodeView }) - LifecycleResumeEffect { + LifecycleResumeEffect(Unit) { barcodeView.resume() onPauseOrDispose { diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/binance/SendBinanceConfirmationScreen.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/binance/SendBinanceConfirmationScreen.kt index 5336b5d8c9..0b1236b341 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/binance/SendBinanceConfirmationScreen.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/binance/SendBinanceConfirmationScreen.kt @@ -20,7 +20,7 @@ fun SendBinanceConfirmationScreen( var confirmationData by remember { mutableStateOf(sendViewModel.getConfirmationData()) } var refresh by remember { mutableStateOf(false) } - LifecycleResumeEffect { + LifecycleResumeEffect(Unit) { if (refresh) { confirmationData = sendViewModel.getConfirmationData() } diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/bitcoin/SendBitcoinConfirmationScreen.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/bitcoin/SendBitcoinConfirmationScreen.kt index d814e41bb5..83c4cd5ec2 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/bitcoin/SendBitcoinConfirmationScreen.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/bitcoin/SendBitcoinConfirmationScreen.kt @@ -20,7 +20,7 @@ fun SendBitcoinConfirmationScreen( var confirmationData by remember { mutableStateOf(sendViewModel.getConfirmationData()) } var refresh by remember { mutableStateOf(false) } - LifecycleResumeEffect { + LifecycleResumeEffect(Unit) { if (refresh) { confirmationData = sendViewModel.getConfirmationData() } diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/solana/SendSolanaConfirmationScreen.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/solana/SendSolanaConfirmationScreen.kt index 9febbcdc90..69ef093a48 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/solana/SendSolanaConfirmationScreen.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/solana/SendSolanaConfirmationScreen.kt @@ -20,7 +20,7 @@ fun SendSolanaConfirmationScreen( var confirmationData by remember { mutableStateOf(sendViewModel.getConfirmationData()) } var refresh by remember { mutableStateOf(false) } - LifecycleResumeEffect { + LifecycleResumeEffect(Unit) { if (refresh) { confirmationData = sendViewModel.getConfirmationData() } diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/ton/SendTonConfirmationScreen.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/ton/SendTonConfirmationScreen.kt index b349968646..8c33de2946 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/ton/SendTonConfirmationScreen.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/ton/SendTonConfirmationScreen.kt @@ -20,7 +20,7 @@ fun SendTonConfirmationScreen( var confirmationData by remember { mutableStateOf(sendViewModel.getConfirmationData()) } var refresh by remember { mutableStateOf(false) } - LifecycleResumeEffect { + LifecycleResumeEffect(Unit) { if (refresh) { confirmationData = sendViewModel.getConfirmationData() } diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/zcash/SendZCashConfirmationScreen.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/zcash/SendZCashConfirmationScreen.kt index 1d514caf89..fac178dd1e 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/zcash/SendZCashConfirmationScreen.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/send/zcash/SendZCashConfirmationScreen.kt @@ -20,7 +20,7 @@ fun SendZCashConfirmationScreen( var confirmationData by remember { mutableStateOf(sendViewModel.getConfirmationData()) } var refresh by remember { mutableStateOf(false) } - LifecycleResumeEffect { + LifecycleResumeEffect(Unit) { if (refresh) { confirmationData = sendViewModel.getConfirmationData() } diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/Theme.kt b/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/Theme.kt index b8b42dca53..dd26564979 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/Theme.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/Theme.kt @@ -1,9 +1,10 @@ package io.horizontalsystems.bankwallet.ui.compose import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.MaterialTheme +import androidx.compose.material.RippleConfiguration import androidx.compose.material.ripple.RippleAlpha -import androidx.compose.material.ripple.RippleTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.compositionLocalOf @@ -67,23 +68,11 @@ fun ComposeAppTheme( } -object AppRippleTheme : RippleTheme { - // Here you should return the ripple color you want - // and not use the defaultRippleColor extension on RippleTheme. - // Using that will override the ripple color set in DarkMode - // or when you set light parameter to false - @Composable - override fun defaultColor(): Color = RippleTheme.defaultRippleColor( - if (isSystemInDarkTheme()) Color.White else Color.Black, - lightTheme = true - ) +private val MyRippleAlpha = RippleAlpha(0.5f, 0.5f, 0.5f, 0.5f) - @Composable - override fun rippleAlpha(): RippleAlpha = RippleTheme.defaultRippleAlpha( - Color.Black, - lightTheme = true - ) -} +@OptIn(ExperimentalMaterialApi::class) +val MyRippleConfiguration = + RippleConfiguration(color = Color.Black, rippleAlpha = MyRippleAlpha) object ComposeAppTheme { val colors: Colors diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsBottomNavigation.kt b/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsBottomNavigation.kt index 74f7c84d5e..db08d62e82 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsBottomNavigation.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsBottomNavigation.kt @@ -11,7 +11,6 @@ import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.* import androidx.compose.foundation.selection.selectableGroup import androidx.compose.material.* -import androidx.compose.material.ripple.rememberRipple import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.getValue @@ -140,7 +139,7 @@ fun RowScope.HsBottomNavigationItem( // The color of the Ripple should always the selected color, as we want to show the color // before the item is considered selected, and hence before the new contentColor is // provided by BottomNavigationTransition. - val ripple = rememberRipple(bounded = false, color = selectedContentColor) + val ripple = ripple(bounded = false, color = selectedContentColor) Box( modifier diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsIconButton.kt b/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsIconButton.kt index 7979cf506f..bbba1ff8cc 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsIconButton.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsIconButton.kt @@ -7,7 +7,7 @@ import androidx.compose.foundation.layout.defaultMinSize import androidx.compose.material.ContentAlpha import androidx.compose.material.Icon import androidx.compose.material.LocalContentAlpha -import androidx.compose.material.ripple.rememberRipple +import androidx.compose.material.ripple import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.remember @@ -38,7 +38,7 @@ fun HsIconButton( enabled = enabled, role = Role.Button, interactionSource = interactionSource, - indication = rememberRipple(bounded = false, radius = RippleRadius, color = rippleColor) + indication = ripple(bounded = false, radius = RippleRadius, color = rippleColor) ), contentAlignment = Alignment.Center ) { diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsTextButton.kt b/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsTextButton.kt index a7f993ab75..7b93d043fb 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsTextButton.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/ui/compose/components/HsTextButton.kt @@ -1,18 +1,20 @@ package io.horizontalsystems.bankwallet.ui.compose.components import androidx.compose.foundation.layout.RowScope +import androidx.compose.material.ExperimentalMaterialApi +import androidx.compose.material.LocalRippleConfiguration import androidx.compose.material.TextButton -import androidx.compose.material.ripple.LocalRippleTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider -import io.horizontalsystems.bankwallet.ui.compose.AppRippleTheme +import io.horizontalsystems.bankwallet.ui.compose.MyRippleConfiguration +@OptIn(ExperimentalMaterialApi::class) @Composable fun HsTextButton( onClick: () -> Unit, content: @Composable RowScope.() -> Unit ) { - CompositionLocalProvider(LocalRippleTheme provides AppRippleTheme) { + CompositionLocalProvider(LocalRippleConfiguration provides MyRippleConfiguration) { TextButton( onClick = onClick ) { diff --git a/build.gradle b/build.gradle index 7935a07cac..2753a4e8c9 100644 --- a/build.gradle +++ b/build.gradle @@ -2,18 +2,18 @@ buildscript { ext { - compile_sdk_version = 34 + compile_sdk_version = 35 min_sdk_version = 27 - lifecycle_version = '2.7.0' + lifecycle_version = '2.8.7' - compose_version = '1.6.7' + compose_version = '1.7.5' kotlin_version = '1.9.23' material_version = "1.12.0" - appcompat_version = "1.6.1" - constraint_version = "2.1.4" - core_ktx_version = "1.13.1" - fragment_ktx_version = "1.7.0" - navigation_ktx_version = "2.7.7" + appcompat_version = "1.7.0" + constraint_version = "2.2.0" + core_ktx_version = "1.15.0" + fragment_ktx_version = "1.8.5" + navigation_ktx_version = "2.8.4" rxjava_version = "2.2.19" biometric_version = "1.1.0" junit_version = "4.13.2" @@ -25,7 +25,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.4.0' + classpath 'com.android.tools.build:gradle:8.7.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/components/chartview/build.gradle b/components/chartview/build.gradle index f7988c8aa9..03b986b579 100644 --- a/components/chartview/build.gradle +++ b/components/chartview/build.gradle @@ -43,5 +43,5 @@ dependencies { implementation "androidx.constraintlayout:constraintlayout:$constraint_version" implementation "androidx.core:core-ktx:$core_ktx_version" - implementation "androidx.compose.runtime:runtime:1.3.2" + implementation "androidx.compose.runtime:runtime:1.7.5" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index be760d2d8c..c8e8c785be 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Mon Oct 10 12:47:09 KGT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME