Updated on 2026-08-14

This commit is contained in:
Tangem 2026-05-26 16:03:11 +04:00
parent ff8f9c9b18
commit 6aab25427d
75 changed files with 2122 additions and 57 deletions

View file

@ -10,6 +10,7 @@ interface StoriesComponent : ComposableContentComponent {
val storyId: String,
val nextScreen: AppRoute? = null,
val screenSource: String,
val shouldMarkAsSeenOnClose: Boolean = true,
)
interface Factory : ComponentFactory<Params, StoriesComponent>

View file

@ -1,6 +1,7 @@
package com.tangem.feature.stories.impl
import com.tangem.domain.stories.models.StoryContentIds
import com.tangem.core.res.R as CoreResR
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
@ -13,6 +14,7 @@ internal object StoriesSlideConfigs {
fun getSlides(storyId: String): ImmutableList<SlideConfig> = when (storyId) {
StoryContentIds.STORY_FIRST_TIME_SWAP.id -> swapSlides()
StoryContentIds.STORY_FIRST_TIME_YIELD_PROMO.id -> yieldPromoSlides()
else -> persistentListOf()
}
@ -34,4 +36,23 @@ internal object StoriesSlideConfigs {
com.tangem.core.res.R.string.swap_story_forth_subtitle_v2,
),
)
private fun yieldPromoSlides(): ImmutableList<SlideConfig> = persistentListOf(
SlideConfig(
CoreResR.string.yield_apy_boost_story_first_title,
CoreResR.string.yield_apy_boost_story_first_subtitle,
),
SlideConfig(
CoreResR.string.yield_apy_boost_story_second_title,
CoreResR.string.yield_apy_boost_story_second_subtitle,
),
SlideConfig(
CoreResR.string.yield_apy_boost_story_third_title,
CoreResR.string.yield_apy_boost_story_third_subtitle,
),
SlideConfig(
CoreResR.string.yield_apy_boost_story_fourth_title,
CoreResR.string.yield_apy_boost_story_fourth_subtitle,
),
)
}

View file

@ -40,7 +40,7 @@ internal class StoriesModel @Inject constructor(
private fun openScreen(hideStories: Boolean = true) {
modelScope.launch {
if (hideStories) {
if (hideStories && params.shouldMarkAsSeenOnClose) {
shouldShowStoriesUseCase.neverToShow(params.storyId)
}
router.pop()