Updated on 2026-08-14
This commit is contained in:
parent
417b2f0906
commit
8541119c1a
2 changed files with 14 additions and 3 deletions
|
|
@ -30,7 +30,13 @@ internal class FeedMarketsBatchFlowManager(
|
|||
private val modelScope: CoroutineScope,
|
||||
private val dispatchers: CoroutineDispatcherProvider,
|
||||
) {
|
||||
private val managersByOrder = TokenMarketListConfig.Order.entries.associateWith { order ->
|
||||
private val managersByOrder = listOf(
|
||||
TokenMarketListConfig.Order.ByRating,
|
||||
TokenMarketListConfig.Order.Trending,
|
||||
TokenMarketListConfig.Order.Buyers,
|
||||
TokenMarketListConfig.Order.TopGainers,
|
||||
TokenMarketListConfig.Order.TopLosers,
|
||||
).associateWith { order ->
|
||||
createManagerForOrder(order)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.tangem.core.ui.extensions.TextReference
|
|||
import com.tangem.features.feed.model.market.list.state.SortByTypeUM
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.ImmutableMap
|
||||
import kotlinx.collections.immutable.toPersistentList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
|
||||
internal data class FeedListUM(
|
||||
val currentDate: String,
|
||||
|
|
@ -51,7 +51,12 @@ internal data class MarketChartConfig(
|
|||
val marketCharts: ImmutableMap<SortByTypeUM, MarketChartUM>,
|
||||
val currentSortByType: SortByTypeUM = SortByTypeUM.TopGainers,
|
||||
) {
|
||||
fun getFilterPreset() = SortByTypeUM.entries.filter { it != SortByTypeUM.Rating }.toPersistentList()
|
||||
fun getFilterPreset() = persistentListOf(
|
||||
SortByTypeUM.Trending,
|
||||
SortByTypeUM.ExperiencedBuyers,
|
||||
SortByTypeUM.TopGainers,
|
||||
SortByTypeUM.TopLosers,
|
||||
)
|
||||
}
|
||||
|
||||
@Immutable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue