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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user