-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes round 3 #1063
Fixes round 3 #1063
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,9 @@ extension AssetsView { | |
} | ||
} | ||
} | ||
#if !DEBUG | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In DEBUG the default value will be used, which is |
||
.environment(\.resourceBalanceHideFiatValue, !viewStore.account.address.isOnMainnet) | ||
#endif | ||
.buttonStyle(.plain) | ||
.scrollContentBackground(.hidden) | ||
.listStyle(.insetGrouped) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -451,6 +451,9 @@ extension ResourceBalanceView { | |
.padding(.leading, isSelected != nil ? .small2 : 0) | ||
|
||
if let isSelected { | ||
if !useSpacer, caption1 == nil { | ||
Spacer(minLength: .small2) | ||
} | ||
CheckmarkView(appearance: .dark, isChecked: isSelected) | ||
} | ||
} | ||
|
@@ -465,7 +468,7 @@ extension ResourceBalanceView { | |
} | ||
|
||
private var useSpacer: Bool { | ||
amount != nil || fallback != nil || caption1 == nil | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wasn't a good place for the fix, it did push out completely the text field for amount entry. |
||
amount != nil || fallback != nil | ||
} | ||
} | ||
|
||
|
@@ -527,6 +530,7 @@ extension ResourceBalanceView { | |
} | ||
|
||
struct AmountView: View { | ||
@Environment(\.resourceBalanceHideFiatValue) var resourceBalanceHideFiatValue | ||
let amount: ResourceBalance.Amount? | ||
let fallback: String? | ||
let compact: Bool | ||
|
@@ -554,7 +558,7 @@ extension ResourceBalanceView { | |
Text(amount.amount.nominalAmount.formatted()) | ||
.textStyle(amountTextStyle) | ||
.foregroundColor(.app.gray1) | ||
if let fiatWorth = amount.amount.fiatWorth?.currencyFormatted(applyCustomFont: false) { | ||
if !resourceBalanceHideFiatValue, let fiatWorth = amount.amount.fiatWorth?.currencyFormatted(applyCustomFont: false) { | ||
Text(fiatWorth) | ||
.textStyle(.body2HighImportance) | ||
.foregroundStyle(.app.gray2) | ||
|
@@ -575,7 +579,7 @@ extension ResourceBalanceView { | |
.textStyle(.secondaryHeader) | ||
.foregroundColor(.app.gray1) | ||
|
||
if let fiatWorth = amount.amount.fiatWorth?.currencyFormatted(applyCustomFont: false) { | ||
if !resourceBalanceHideFiatValue, let fiatWorth = amount.amount.fiatWorth?.currencyFormatted(applyCustomFont: false) { | ||
Text(fiatWorth) | ||
.textStyle(.body2HighImportance) | ||
.foregroundStyle(.app.gray2) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please out put this in another file. Please :D
RadixWallet/EngineKit/
is verboten! :DThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh yes, forgoten it is verboten :D