From 1906dd4df248d3e6cb8f23a693e1c1ca25ab7e6a Mon Sep 17 00:00:00 2001 From: "Harry S (Macbook)" Date: Sat, 11 May 2024 11:16:49 +0100 Subject: [PATCH] Update accuracy of coin previews --- .../ui/previewdata/FavouritesUiStatePreviewProvider.kt | 5 +++-- .../coinwatch/ui/previewdata/MarketUiStatePreviewProvider.kt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/dev/shorthouse/coinwatch/ui/previewdata/FavouritesUiStatePreviewProvider.kt b/app/src/main/java/dev/shorthouse/coinwatch/ui/previewdata/FavouritesUiStatePreviewProvider.kt index 6ab84fe9..e8d46120 100644 --- a/app/src/main/java/dev/shorthouse/coinwatch/ui/previewdata/FavouritesUiStatePreviewProvider.kt +++ b/app/src/main/java/dev/shorthouse/coinwatch/ui/previewdata/FavouritesUiStatePreviewProvider.kt @@ -6,13 +6,14 @@ import dev.shorthouse.coinwatch.model.Percentage import dev.shorthouse.coinwatch.model.Price import dev.shorthouse.coinwatch.ui.previewdata.FavouritesPreviewData.favouriteCoins import dev.shorthouse.coinwatch.ui.screen.favourites.FavouritesUiState -import java.math.BigDecimal import kotlinx.collections.immutable.persistentListOf +import java.math.BigDecimal class FavouritesUiStatePreviewProvider : PreviewParameterProvider { override val values = sequenceOf( FavouritesUiState( - favouriteCoins = favouriteCoins + favouriteCoins = favouriteCoins, + isFavouriteCoinsEmpty = false ), FavouritesUiState( favouriteCoins = persistentListOf() diff --git a/app/src/main/java/dev/shorthouse/coinwatch/ui/previewdata/MarketUiStatePreviewProvider.kt b/app/src/main/java/dev/shorthouse/coinwatch/ui/previewdata/MarketUiStatePreviewProvider.kt index b79ffb61..ede60356 100644 --- a/app/src/main/java/dev/shorthouse/coinwatch/ui/previewdata/MarketUiStatePreviewProvider.kt +++ b/app/src/main/java/dev/shorthouse/coinwatch/ui/previewdata/MarketUiStatePreviewProvider.kt @@ -73,7 +73,7 @@ private object CoinListPreviewData { name = "USDC", imageUrl = "https://cdn.coinranking.com/jkDf8sQbY/usdc.svg", currentPrice = Price("1.00"), - priceChangePercentage24h = Percentage("0.08"), + priceChangePercentage24h = Percentage("0.00"), ), Coin( id = "polkadot",