parent
e9727ac2c5
commit
e8305184af
|
@ -77,8 +77,12 @@ struct TipJarView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onPreferenceChange(ButtonWidthKey.self) { newValue in
|
.onPreferenceChange(ButtonWidthKey.self) { newValue in
|
||||||
|
if let buttonWidth {
|
||||||
|
self.buttonWidth = max(buttonWidth, newValue)
|
||||||
|
} else {
|
||||||
self.buttonWidth = newValue
|
self.buttonWidth = newValue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if let total = getTotalTips(), total > 0 {
|
if let total = getTotalTips(), total > 0 {
|
||||||
Text("You've tipped a total of \(Text(total, format: products[0].0.priceFormatStyle)) 😍")
|
Text("You've tipped a total of \(Text(total, format: products[0].0.priceFormatStyle)) 😍")
|
||||||
|
|
Loading…
Reference in New Issue