Fix tip jar button width changing while purchasing

Closes #389
This commit is contained in:
Shadowfacts 2023-05-27 15:20:42 -07:00
parent e9727ac2c5
commit e8305184af
1 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,11 @@ struct TipJarView: View {
} }
} }
.onPreferenceChange(ButtonWidthKey.self) { newValue in .onPreferenceChange(ButtonWidthKey.self) { newValue in
self.buttonWidth = newValue if let buttonWidth {
self.buttonWidth = max(buttonWidth, newValue)
} else {
self.buttonWidth = newValue
}
} }
if let total = getTotalTips(), total > 0 { if let total = getTotalTips(), total > 0 {