fix: iOS 26 toolbar items duplicate in CurrencyInfo loading state#299
Open
raulriera wants to merge 1 commit into
Open
fix: iOS 26 toolbar items duplicate in CurrencyInfo loading state#299raulriera wants to merge 1 commit into
raulriera wants to merge 1 commit into
Conversation
Background's body composed its color via `.background { ... }`, which
leaves the content's TupleView exposed at the top of the wrapper. On
iOS 26, a parent attaching `.toolbar { ToolbarItem(...) }` then renders
each item once per top-level sibling in that TupleView — three Spacer/
LoadingView/Spacer children produced three share buttons inside one
Liquid Glass pill. Switching the body to a ZStack encapsulates the
children as a single subtree and the bug doesn't fire. Also drops the
AnyView storage now that the property is always a Color, and tightens
both stored properties to private.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On iOS 26, opening Currency Info for a token whose metadata isn't cached rendered the share button three times inside a single Liquid Glass pill in the toolbar. The shared Background utility composed its color via the
.backgroundmodifier, which left its content's TupleView exposed at the top of the wrapper — iOS 26's toolbar pass then duplicated each ToolbarItem once per top-level sibling (Spacer/LoadingView/Spacer → three buttons). Switching Background's body to a ZStack encapsulates the children as a single subtree and the duplication doesn't fire.While I was there, dropped the AnyView storage now that the property is always a Color, and tightened both stored properties to private.
Test plan