mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 01:40:12 +01:00
Update ios/Widgets/PriceWidget/PriceIntent.swift
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
ff3ec2d51e
commit
d827464821
@ -74,15 +74,18 @@ struct CompactPriceView: View {
|
||||
VStack {
|
||||
Text(priceFormatted)
|
||||
.font(.title)
|
||||
.accessibilityLabel("Bitcoin price: \(priceFormatted)")
|
||||
Text(detailsText)
|
||||
.font(.caption)
|
||||
.foregroundColor(.gray)
|
||||
.accessibilityLabel("Last updated \(lastUpdated) from \(dataSource)")
|
||||
.padding(.top, 8)
|
||||
.lineLimit(1)
|
||||
.minimumScaleFactor(0.5)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
.frame(maxWidth: 200)
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(idealWidth: 200)
|
||||
.padding()
|
||||
.background(.ultraThinMaterial)
|
||||
.cornerRadius(10)
|
||||
@ -92,7 +95,9 @@ struct CompactPriceView: View {
|
||||
let formatter = NumberFormatter()
|
||||
formatter.numberStyle = .currency
|
||||
formatter.currencyCode = currencyCode
|
||||
formatter.locale = Locale(identifier: Locale.current.identifier)
|
||||
formatter.maximumFractionDigits = 2
|
||||
formatter.minimumFractionDigits = 2
|
||||
return formatter.string(from: NSNumber(value: price)) ?? "--"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user