From e8305184afc0e906f85e475021bb1b7ad07f64f8 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 27 May 2023 15:20:42 -0700 Subject: [PATCH] Fix tip jar button width changing while purchasing Closes #389 --- Tusker/Screens/Preferences/Tip Jar/TipJarView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Preferences/Tip Jar/TipJarView.swift b/Tusker/Screens/Preferences/Tip Jar/TipJarView.swift index 8556a8bb..93e5d880 100644 --- a/Tusker/Screens/Preferences/Tip Jar/TipJarView.swift +++ b/Tusker/Screens/Preferences/Tip Jar/TipJarView.swift @@ -77,7 +77,11 @@ struct TipJarView: View { } } .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 {