Skip to content

Commit 7b784cf

Browse files
committed
Merge remote-tracking branch 'origin/feat/system-widgets-foundation' into feat/price-widget-v61
# Conflicts: # app/src/main/java/to/bitkit/appwidget/config/AppWidgetConfigScreen.kt # app/src/main/java/to/bitkit/appwidget/ui/price/PriceGlanceContent.kt
2 parents ff6993c + c082153 commit 7b784cf

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

app/src/main/java/to/bitkit/appwidget/ui/components/GlanceText.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fun Subtitle(
1414
color: ColorProvider? = null,
1515
maxLines: Int = Int.MAX_VALUE,
1616
) {
17-
Text(text = text, modifier = modifier, style = GlanceTextStyles.subtitle.withColor(color), maxLines = maxLines)
17+
Text(text = text, style = GlanceTextStyles.subtitle.withColor(color), maxLines = maxLines, modifier = modifier)
1818
}
1919

2020
@Composable
@@ -24,7 +24,7 @@ fun BodyMSB(
2424
color: ColorProvider? = null,
2525
maxLines: Int = Int.MAX_VALUE,
2626
) {
27-
Text(text = text, modifier = modifier, style = GlanceTextStyles.bodyMSB.withColor(color), maxLines = maxLines)
27+
Text(text = text, style = GlanceTextStyles.bodyMSB.withColor(color), maxLines = maxLines, modifier = modifier)
2828
}
2929

3030
@Composable
@@ -34,7 +34,7 @@ fun BodySSB(
3434
color: ColorProvider? = null,
3535
maxLines: Int = Int.MAX_VALUE,
3636
) {
37-
Text(text = text, modifier = modifier, style = GlanceTextStyles.bodySSB.withColor(color), maxLines = maxLines)
37+
Text(text = text, style = GlanceTextStyles.bodySSB.withColor(color), maxLines = maxLines, modifier = modifier)
3838
}
3939

4040
@Composable
@@ -44,7 +44,7 @@ fun BodySB(
4444
color: ColorProvider? = null,
4545
maxLines: Int = Int.MAX_VALUE,
4646
) {
47-
Text(text = text, modifier = modifier, style = GlanceTextStyles.bodySB.withColor(color), maxLines = maxLines)
47+
Text(text = text, style = GlanceTextStyles.bodySB.withColor(color), maxLines = maxLines, modifier = modifier)
4848
}
4949

5050
@Composable
@@ -54,7 +54,7 @@ fun CaptionB(
5454
color: ColorProvider? = null,
5555
maxLines: Int = Int.MAX_VALUE,
5656
) {
57-
Text(text = text, modifier = modifier, style = GlanceTextStyles.captionB.withColor(color), maxLines = maxLines)
57+
Text(text = text, style = GlanceTextStyles.captionB.withColor(color), maxLines = maxLines, modifier = modifier)
5858
}
5959

6060
@Composable
@@ -64,7 +64,7 @@ fun FootnoteM(
6464
color: ColorProvider? = null,
6565
maxLines: Int = Int.MAX_VALUE,
6666
) {
67-
Text(text = text, modifier = modifier, style = GlanceTextStyles.footnoteM.withColor(color), maxLines = maxLines)
67+
Text(text = text, style = GlanceTextStyles.footnoteM.withColor(color), maxLines = maxLines, modifier = modifier)
6868
}
6969

7070
private fun TextStyle.withColor(color: ColorProvider?): TextStyle =

app/src/main/java/to/bitkit/data/widgets/PriceService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class PriceService @Inject constructor(
3838
override val refreshInterval = 1.minutes
3939
private val sourceLabel = "Bitfinex.com"
4040

41-
override suspend fun fetchData(): Result<PriceDTO> {
41+
override suspend fun fetchData(): Result<PriceDTO> = runCatching {
4242
val period = widgetsStore.data.first().pricePreferences.period ?: GraphPeriod.ONE_DAY
43-
return fetchData(period)
43+
fetchData(period).getOrThrow()
4444
}
4545

4646
suspend fun fetchData(period: GraphPeriod): Result<PriceDTO> = runCatching {

0 commit comments

Comments
 (0)