Updated on 2026-08-14
This commit is contained in:
parent
0ad4588d2c
commit
fbf91e4c6d
4 changed files with 7 additions and 13 deletions
|
|
@ -262,6 +262,6 @@ private fun formatAnnotated(rawString: String): AnnotatedString {
|
||||||
*
|
*
|
||||||
* @return The original reference if hide is false, or reference with STARS if hide is true.
|
* @return The original reference if hide is false, or reference with STARS if hide is true.
|
||||||
*/
|
*/
|
||||||
fun TextReference.orMaskWithStars(mask: Boolean) : TextReference {
|
fun TextReference.orMaskWithStars(mask: Boolean): TextReference {
|
||||||
return if (mask) stringReference(STARS) else this
|
return if (mask) stringReference(STARS) else this
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
package com.tangem.utils
|
package com.tangem.utils
|
||||||
|
|
||||||
import com.tangem.utils.StringsSigns.STARS
|
|
||||||
|
|
||||||
object StringsSigns {
|
object StringsSigns {
|
||||||
|
|
||||||
const val STARS = "\u2217\u2217\u2217"
|
const val STARS = "\u2217\u2217\u2217"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,6 @@ import com.tangem.utils.StringsSigns.STARS
|
||||||
*
|
*
|
||||||
* @return The original string if hide is false, or STARS if hide is true.
|
* @return The original string if hide is false, or STARS if hide is true.
|
||||||
*/
|
*/
|
||||||
fun String.orHide(hide: Boolean) : String {
|
fun String.orHide(hide: Boolean): String {
|
||||||
return if (hide) STARS else this
|
return if (hide) STARS else this
|
||||||
}
|
}
|
||||||
|
|
@ -38,11 +38,7 @@ import com.tangem.features.tokendetails.impl.R
|
||||||
* @param modifier modifier
|
* @param modifier modifier
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
internal fun TokenStakingBlock(
|
internal fun TokenStakingBlock(state: StakingBlockUM, isBalanceHidden: Boolean, modifier: Modifier = Modifier) {
|
||||||
state: StakingBlockUM,
|
|
||||||
isBalanceHidden: Boolean,
|
|
||||||
modifier: Modifier = Modifier,
|
|
||||||
) {
|
|
||||||
AnimatedContent(
|
AnimatedContent(
|
||||||
targetState = state,
|
targetState = state,
|
||||||
contentAlignment = Alignment.CenterStart,
|
contentAlignment = Alignment.CenterStart,
|
||||||
|
|
@ -130,7 +126,7 @@ private fun StakingLoading(iconState: IconState, modifier: Modifier = Modifier)
|
||||||
.heightIn(min = TangemTheme.dimens.size72)
|
.heightIn(min = TangemTheme.dimens.size72)
|
||||||
.padding(all = TangemTheme.dimens.spacing12),
|
.padding(all = TangemTheme.dimens.spacing12),
|
||||||
|
|
||||||
) {
|
) {
|
||||||
Row {
|
Row {
|
||||||
val (alpha, colorFilter) = remember(iconState.isGrayscale) {
|
val (alpha, colorFilter) = remember(iconState.isGrayscale) {
|
||||||
getGreyScaleColorFilter(iconState.isGrayscale)
|
getGreyScaleColorFilter(iconState.isGrayscale)
|
||||||
|
|
@ -180,7 +176,7 @@ private fun Preview_TokenStakingBlock(
|
||||||
TangemThemePreview {
|
TangemThemePreview {
|
||||||
TokenStakingBlock(
|
TokenStakingBlock(
|
||||||
state = state,
|
state = state,
|
||||||
isBalanceHidden = false
|
isBalanceHidden = false,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue