Skip to content

Commit 962ffc3

Browse files
committed
fix: set default widgets
1 parent 0d55a45 commit 962ffc3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/main/java/to/bitkit/data/WidgetsStore.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class WidgetsStore @Inject constructor(
5151
it.copy(calculatorValues = calculatorValues)
5252
}
5353
}
54+
5455
suspend fun updateArticles(articles: List<ArticleDTO>) {
5556
store.updateData {
5657
it.copy(articles = articles)
@@ -147,7 +148,11 @@ class WidgetsStore @Inject constructor(
147148

148149
@Serializable
149150
data class WidgetsData(
150-
val widgets: List<WidgetWithPosition> = emptyList(),
151+
val widgets: List<WidgetWithPosition> = listOf(
152+
WidgetWithPosition(type = WidgetType.PRICE, position = 0),
153+
WidgetWithPosition(type = WidgetType.BLOCK, position = 1),
154+
WidgetWithPosition(type = WidgetType.NEWS, position = 2),
155+
),
151156
val headlinePreferences: HeadlinePreferences = HeadlinePreferences(),
152157
val factsPreferences: FactsPreferences = FactsPreferences(),
153158
val blocksPreferences: BlocksPreferences = BlocksPreferences(),

0 commit comments

Comments
 (0)