NTP-19785 | Sohan Reddy | Holiday Scratch Cards Impl (#14198)
This commit is contained in:
committed by
GitHub
parent
af80da4195
commit
c0b9e8eb72
Binary file not shown.
@@ -8,6 +8,7 @@
|
||||
package com.navi.rr.scratchcard.utils
|
||||
|
||||
import com.navi.common.R
|
||||
import com.navi.rr.scratchcard.utils.ScratchCardTheme.ThemeConfig.Companion.HOLIDAY_CELEBRATION_THEME_KEY
|
||||
|
||||
fun getLottieForScratchCard(themeValue: String?): Int {
|
||||
return ScratchCardTheme.entries.firstOrNull { it.themeName == themeValue }?.themeConfig?.lottie
|
||||
@@ -16,11 +17,16 @@ fun getLottieForScratchCard(themeValue: String?): Int {
|
||||
|
||||
enum class ScratchCardTheme(val themeName: String, val themeConfig: ThemeConfig) {
|
||||
|
||||
DEFAULT("default", ThemeConfig(lottie = R.raw.gratifaction_confetti));
|
||||
DEFAULT("default", ThemeConfig(lottie = R.raw.gratifaction_confetti)),
|
||||
HOLIDAY_CELEBRATION_THEME(
|
||||
HOLIDAY_CELEBRATION_THEME_KEY,
|
||||
ThemeConfig(lottie = R.raw.holiday_celebration_confetti)
|
||||
);
|
||||
|
||||
data class ThemeConfig(val lottie: Int) {
|
||||
companion object {
|
||||
const val SCRATCH_CARD_THEME_KEY = "theme"
|
||||
const val HOLIDAY_CELEBRATION_THEME_KEY = "holiday_celebration"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -883,6 +883,7 @@ object NaviWidgetIconUtils {
|
||||
private const val OFFER_ICON_PURPLE_WITH_BORDER = "OFFER_ICON_PURPLE_WITH_BORDER"
|
||||
private const val BBPS_CATEGORY_ICON_PLACEHOLDER = "BBPS_CATEGORY_ICON_PLACEHOLDER"
|
||||
private const val NAVI_ICON = "NAVI_ICON"
|
||||
private const val HOLIDAY_SCRATCH_CARD_IMAGE = "HOLIDAY_SCRATCH_CARD_IMAGE"
|
||||
|
||||
fun updateIcon(
|
||||
imageDetail: ImageDetail,
|
||||
@@ -1798,6 +1799,7 @@ object NaviWidgetIconUtils {
|
||||
OFFER_ICON_PURPLE -> R.drawable.ic_offer_purple
|
||||
OFFER_ICON_PURPLE_WITH_BORDER -> R.drawable.ic_offer_purple_with_border
|
||||
NAVI_ICON -> R.drawable.navi_icon
|
||||
HOLIDAY_SCRATCH_CARD_IMAGE -> R.drawable.holiday_scratch_card_image
|
||||
else -> -1
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
Reference in New Issue
Block a user