Skip to content

fix: iOS 26 toolbar items duplicate in CurrencyInfo loading state#299

Open
raulriera wants to merge 1 commit into
mainfrom
fix/ios26-toolbar-duplication
Open

fix: iOS 26 toolbar items duplicate in CurrencyInfo loading state#299
raulriera wants to merge 1 commit into
mainfrom
fix/ios26-toolbar-duplication

Conversation

@raulriera
Copy link
Copy Markdown
Collaborator

@raulriera raulriera commented May 21, 2026

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 .background modifier, 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

  • Open Currency Info for a token you don't own from Discover and confirm the loading state shows one share button in the top right
  • Confirm the loaded state still shows one share button
  • Spot-check Wallet, Settings, Withdraw, and a couple of Onboarding screens for visual regressions

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant