Updated on 2026-08-14

This commit is contained in:
Tangem 2025-02-21 16:03:19 +05:00
parent 054a7f982f
commit a7ab7abbfb
23 changed files with 165 additions and 30 deletions

View file

@ -10,7 +10,7 @@ object SwapStoriesFactory {
// WARNING! Be careful with indices. Temporary solution.
// Use all data from v1/stories api (image url, title, subtitle)
@Suppress("MagicNumber")
fun createStoriesState(swapStory: StoryContent, onStoriesClose: () -> Unit): SwapStoriesUM {
fun createStoriesState(swapStory: StoryContent, onStoriesClose: (Int) -> Unit): SwapStoriesUM {
val storyOrderedImageUrls = swapStory.getImageUrls()
if (storyOrderedImageUrls.size != 5) return SwapStoriesUM.Empty

View file

@ -1,7 +1,6 @@
package com.tangem.common.ui.swapStoriesScreen
import android.content.res.Configuration
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Text
@ -39,7 +38,6 @@ private const val STORIES_RELATIVE_PADDING = 0.7
fun SwapStoriesScreen(config: SwapStoriesUM) {
if (config !is SwapStoriesUM.Content) return
BackHandler(onBack = config.onClose)
SystemBarsIconsDisposable(darkIcons = false)
StoriesContainer(

View file

@ -12,7 +12,7 @@ sealed class SwapStoriesUM {
data class Content(
override val stories: ImmutableList<Config>,
override val onClose: () -> Unit,
override val onClose: (Int) -> Unit,
) : SwapStoriesUM(), StoriesContentConfig<Content.Config> {
override val isRestartable: Boolean = false