Skip to content

Commit 8a6cfe7

Browse files
committed
feat: toggle show source
1 parent 83267c5 commit 8a6cfe7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

app/src/main/java/to/bitkit/ui/screens/widgets/price/PriceEditScreen.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ fun PriceEditScreen(
6666
onClickGraph = { period ->
6767
viewModel.setPeriod(period = period)
6868
},
69-
isLoading = isLoading
69+
isLoading = isLoading,
70+
onClickSource = {
71+
viewModel.toggleShowSource()
72+
}
7073
)
7174
}
7275

@@ -80,6 +83,7 @@ fun PriceEditContent(
8083
onClickGraph: (GraphPeriod) -> Unit,
8184
onClickTradingPair: (TradingPair) -> Unit,
8285
onClickPreview: () -> Unit,
86+
onClickSource: () -> Unit,
8387
preferences: PricePreferences,
8488
isLoading: Boolean,
8589
) {
@@ -132,6 +136,14 @@ fun PriceEditContent(
132136
testTagPrefix = priceData.period.name
133137
)
134138
}
139+
140+
PriceEditOptionRow(
141+
label = stringResource(R.string.widgets__widget__source),
142+
value = priceModel.source,
143+
isEnabled = preferences.showSource,
144+
onClick = onClickSource,
145+
testTagPrefix = "source"
146+
)
135147
}
136148

137149
Row(

0 commit comments

Comments
 (0)