Updated on 2026-08-14
This commit is contained in:
parent
b7a7d6218a
commit
89947f0e05
2 changed files with 7 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package com.tangem.common.ui.swapStoriesScreen
|
||||
|
||||
import com.tangem.core.ui.components.stories.inner.STORY_DURATION
|
||||
import com.tangem.core.ui.components.stories.model.StoriesContentConfig
|
||||
import com.tangem.core.ui.components.stories.model.StoryConfig
|
||||
import com.tangem.core.ui.extensions.TextReference
|
||||
|
|
@ -20,7 +21,7 @@ sealed class SwapStoriesUM {
|
|||
val title: TextReference,
|
||||
val subtitle: TextReference,
|
||||
) : StoryConfig {
|
||||
override val duration: Int = 2000
|
||||
override val duration: Int = STORY_DURATION
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -35,9 +35,11 @@ internal class StoriesModel @Inject constructor(
|
|||
initStories()
|
||||
}
|
||||
|
||||
private fun openScreen() {
|
||||
private fun openScreen(hideStories: Boolean = true) {
|
||||
modelScope.launch {
|
||||
shouldShowSwapStoriesUseCase.neverToShow()
|
||||
if (hideStories) {
|
||||
shouldShowSwapStoriesUseCase.neverToShow()
|
||||
}
|
||||
router.pop()
|
||||
router.push(params.nextScreen)
|
||||
}
|
||||
|
|
@ -48,7 +50,7 @@ internal class StoriesModel @Inject constructor(
|
|||
getStoryContentUseCase(params.storyId).fold(
|
||||
ifLeft = {
|
||||
Timber.e("Unable to load stories for ${StoryContentIds.STORY_FIRST_TIME_SWAP.id}")
|
||||
openScreen() // Fallback to target screen
|
||||
openScreen(hideStories = false) // Fallback to target screen
|
||||
},
|
||||
ifRight = { swapStory ->
|
||||
_state.update {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue