banner: key by value so tip fades out on dismiss

The banner sits in a single if-let slot; without an identity key, clearing a
tip that was covering a network/offline banner swapped content in place with
no transition (instantly vanishing). Keying the banner by its value (.id)
makes every change — tip→network or tip→nil — run the shared removal
transition, so the tip slides up and fades out when it auto-dismisses or is
tapped.
This commit is contained in:
FuelBoard Contributor
2026-08-19 11:10:29 +01:00
parent cfd435d12a
commit 4c222cdf55
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -604,7 +604,7 @@ final class TipStore: ObservableObject {
]
/// A banner outcome: the exact copy to show plus its icon + tint.
struct TipOutcome: Equatable {
struct TipOutcome: Hashable {
let message: String
let icon: String
let tint: Color