Updated on 2026-08-14
This commit is contained in:
parent
ac8436460c
commit
459db3d0df
17 changed files with 263 additions and 102 deletions
|
|
@ -39,6 +39,7 @@ import com.tangem.core.ui.components.*
|
|||
import com.tangem.core.ui.components.currency.icon.CoinIcon
|
||||
import com.tangem.core.ui.components.marketprice.PriceChangeInPercent
|
||||
import com.tangem.core.ui.components.marketprice.PriceChangeType
|
||||
import com.tangem.core.ui.haptic.TangemHapticEffect
|
||||
import com.tangem.core.ui.res.LocalHapticManager
|
||||
import com.tangem.core.ui.res.LocalWindowSize
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
|
|
@ -97,14 +98,14 @@ fun MarketsListItem(
|
|||
.collect {
|
||||
val border = -actionWidthPx * SWIPE_THRESHOLD_PERCENT
|
||||
if (it < border && actionPerformed.not()) {
|
||||
hapticManager.vibrateLong()
|
||||
hapticManager.perform(TangemHapticEffect.View.GestureThresholdActivate)
|
||||
actionPerformed = true
|
||||
releasePerformed = false
|
||||
}
|
||||
|
||||
if (it > border) {
|
||||
if (releasePerformed.not()) {
|
||||
hapticManager.vibrateShort()
|
||||
hapticManager.perform(TangemHapticEffect.View.GestureThresholdDeactivate)
|
||||
releasePerformed = true
|
||||
}
|
||||
actionPerformed = false
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ import com.tangem.core.ui.extensions.TextReference
|
|||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.extensions.stringReference
|
||||
import com.tangem.core.ui.extensions.wrappedList
|
||||
import com.tangem.core.ui.haptic.HapticManager
|
||||
import com.tangem.core.ui.haptic.TangemHapticEffect
|
||||
import com.tangem.core.ui.haptic.VibratorHapticManager
|
||||
import com.tangem.datasource.local.swaptx.SwapTransactionStatusStore
|
||||
import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase
|
||||
import com.tangem.domain.appcurrency.model.AppCurrency
|
||||
|
|
@ -120,7 +121,7 @@ internal class TokenDetailsViewModel @Inject constructor(
|
|||
private val associateAssetUseCase: AssociateAssetUseCase,
|
||||
private val reduxStateHolder: ReduxStateHolder,
|
||||
private val analyticsEventsHandler: AnalyticsEventHandler,
|
||||
private val hapticManager: HapticManager,
|
||||
private val vibratorHapticManager: VibratorHapticManager,
|
||||
private val clipboardManager: ClipboardManager,
|
||||
private val getUserWalletUseCase: GetUserWalletUseCase,
|
||||
tokenDetailsFeatureToggles: TokenDetailsFeatureToggles,
|
||||
|
|
@ -580,7 +581,7 @@ internal class TokenDetailsViewModel @Inject constructor(
|
|||
ifRight = { it },
|
||||
)
|
||||
if (extendedKey.isNotBlank()) {
|
||||
hapticManager.vibrateMeduim()
|
||||
vibratorHapticManager.performOneTime(TangemHapticEffect.OneTime.Click)
|
||||
clipboardManager.setText(text = extendedKey)
|
||||
internalUiState.value = stateFactory.getStateAndTriggerEvent(
|
||||
state = internalUiState.value,
|
||||
|
|
@ -802,7 +803,7 @@ internal class TokenDetailsViewModel @Inject constructor(
|
|||
val addresses = networkAddress.availableAddresses.mapToAddressModels(cryptoCurrency).toImmutableList()
|
||||
val defaultAddress = addresses.firstOrNull()?.value ?: return null
|
||||
|
||||
hapticManager.vibrateMeduim()
|
||||
vibratorHapticManager.performOneTime(TangemHapticEffect.OneTime.Click)
|
||||
clipboardManager.setText(text = defaultAddress)
|
||||
analyticsEventsHandler.send(TokenReceiveAnalyticsEvent.ButtonCopyAddress(cryptoCurrency.symbol))
|
||||
return resourceReference(R.string.wallet_notification_address_copied)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ import com.tangem.core.ui.extensions.TextReference
|
|||
import com.tangem.core.ui.extensions.WrappedList
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.extensions.wrappedList
|
||||
import com.tangem.core.ui.haptic.HapticManager
|
||||
import com.tangem.core.ui.haptic.TangemHapticEffect
|
||||
import com.tangem.core.ui.haptic.VibratorHapticManager
|
||||
import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase
|
||||
import com.tangem.domain.appcurrency.extenstions.unwrap
|
||||
import com.tangem.domain.common.util.cardTypesResolver
|
||||
|
|
@ -91,7 +92,7 @@ internal class WalletCurrencyActionsClickIntentsImplementor @Inject constructor(
|
|||
private val analyticsEventHandler: AnalyticsEventHandler,
|
||||
private val dispatchers: CoroutineDispatcherProvider,
|
||||
private val reduxStateHolder: ReduxStateHolder,
|
||||
private val hapticManager: HapticManager,
|
||||
private val vibratorHapticManager: VibratorHapticManager,
|
||||
private val clipboardManager: ClipboardManager,
|
||||
private val getYieldUseCase: GetYieldUseCase,
|
||||
) : BaseWalletClickIntents(), WalletCurrencyActionsClickIntents {
|
||||
|
|
@ -192,7 +193,7 @@ internal class WalletCurrencyActionsClickIntentsImplementor @Inject constructor(
|
|||
val addresses = networkAddress.availableAddresses.mapToAddressModels(cryptoCurrency).toImmutableList()
|
||||
val defaultAddress = addresses.firstOrNull()?.value ?: return null
|
||||
|
||||
hapticManager.vibrateMeduim()
|
||||
vibratorHapticManager.performOneTime(TangemHapticEffect.OneTime.Click)
|
||||
clipboardManager.setText(text = defaultAddress)
|
||||
analyticsEventHandler.send(TokenReceiveAnalyticsEvent.ButtonCopyAddress(cryptoCurrency.symbol))
|
||||
return resourceReference(R.string.wallet_notification_address_copied)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue