Skip to content

Don't hide Find My / Shared Albums / Passwords in the menu before state loads - #263

Open
FrankBStack wants to merge 1 commit into
OpenBubbles:rustpushfrom
FrankBStack:fix/overflow-menu-capabilities
Open

Don't hide Find My / Shared Albums / Passwords in the menu before state loads#263
FrankBStack wants to merge 1 commit into
OpenBubbles:rustpushfrom
FrankBStack:fix/overflow-menu-capabilities

Conversation

@FrankBStack

@FrankBStack FrankBStack commented Sep 6, 2026

Copy link
Copy Markdown

pushService.state takes a few seconds to load after launch. Both overflow menus (MaterialOverflowMenu and CupertinoOverflowMenu) gate the Find My, Shared Albums and Passwords entries on pushService.state?.icloudServices?.*, so if you open the menu during that window those entries are just missing, and the menu keeps rendering without them until it's closed and reopened.

Fix:

  • RustPushService.state is now a property. Its setter records fmfd / sharedstreams / keychain availability to prefs whenever state is assigned (init, setup, re-registration), and removes those keys when state is set to null on logout so a cached answer can't outlive the account.
  • New hasFindMy / hasSharedStreams / hasKeychain getters return the live answer when state is present and the cached one otherwise.
  • BackendService gains supportsSharedStreams() and supportsKeychain() alongside the existing supportsFindMy(). The rustpush backend routes all three through the getters above; the HTTP backend returns false for the two new ones (it never had these features).
  • Both menus call the backend methods instead of reading the push state directly.

Behavior is identical once state has loaded. The only visible change is that the first menu open after launch matches what you'd see a few seconds later.

…te loads

The overflow menu decides whether to show the Find My, Shared Albums
and Passwords entries by looking at pushService.state, which is null
for the first few seconds after launch. Opening the menu in that window
gave a shorter menu than usual, and it stayed that way until the menu
was closed and reopened.

Remember the last known answer for each service in prefs whenever the
push state is assigned, and fall back to that while state is still
null. The cache is cleared when state is cleared on logout, so it can't
outlive the account it was recorded for. Both the Material and
Cupertino menus now go through the backend for these checks instead of
poking at the push state directly.
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