NTP-33778| Sidharth Bamba | bbps shimmer fix (#14809)
This commit is contained in:
@@ -10,10 +10,12 @@ package com.navi.bbps.common.arc.ui
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
@@ -32,7 +34,6 @@ import com.navi.bbps.clickableDebounce
|
||||
import com.navi.bbps.common.arc.model.view.BbpsArcProperties
|
||||
import com.navi.bbps.common.theme.NaviBbpsColor
|
||||
import com.navi.common.R as CommonR
|
||||
import com.navi.common.extensions.conditional
|
||||
import com.navi.design.font.FontWeightEnum
|
||||
import com.navi.design.font.getFontWeight
|
||||
import com.navi.design.font.naviFontFamily
|
||||
@@ -105,29 +106,29 @@ fun ArcStatusDescriptionCard(
|
||||
)
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
|
||||
Row(
|
||||
modifier =
|
||||
Modifier.conditional(arcRewardCoins.isNullOrEmpty()) {
|
||||
bbpsShimmerEffect()
|
||||
}
|
||||
) {
|
||||
NaviText(
|
||||
text = "${arcRewardCoins}." + SPACE,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
fontFamily = naviFontFamily,
|
||||
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
|
||||
color = NaviBbpsColor.textTertiary,
|
||||
)
|
||||
NaviText(
|
||||
text = stringResource(id = R.string.bbps_know_more),
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
fontFamily = naviFontFamily,
|
||||
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
|
||||
color = NaviBbpsColor.textTertiary,
|
||||
textDecoration = TextDecoration.Underline,
|
||||
)
|
||||
if (arcRewardCoins.isNullOrEmpty()) {
|
||||
Box(modifier = Modifier.width(70.dp).height(16.dp).bbpsShimmerEffect())
|
||||
} else {
|
||||
|
||||
Row {
|
||||
NaviText(
|
||||
text = "${arcRewardCoins}." + SPACE,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
fontFamily = naviFontFamily,
|
||||
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
|
||||
color = NaviBbpsColor.textTertiary,
|
||||
)
|
||||
NaviText(
|
||||
text = stringResource(id = R.string.bbps_know_more),
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
fontFamily = naviFontFamily,
|
||||
fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR),
|
||||
color = NaviBbpsColor.textTertiary,
|
||||
textDecoration = TextDecoration.Underline,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ constructor(
|
||||
)
|
||||
val rewardsGratificationUIState = _rewardsGratificationUIState.asStateFlow()
|
||||
|
||||
private val _arcRewardCoins = MutableStateFlow<String?>(null)
|
||||
private val _arcRewardCoins = MutableStateFlow<String?>("")
|
||||
val arcRewardCoins = _arcRewardCoins.asStateFlow()
|
||||
|
||||
private val _showArcRewardFromNudgeResponse = MutableStateFlow<Boolean>(false)
|
||||
|
||||
Reference in New Issue
Block a user