Skip to content

fix(NavigationManager): resolve entries only when needed#61055

Open
susnux wants to merge 2 commits into
masterfrom
fix/navigation
Open

fix(NavigationManager): resolve entries only when needed#61055
susnux wants to merge 2 commits into
masterfrom
fix/navigation

Conversation

@susnux
Copy link
Copy Markdown
Contributor

@susnux susnux commented Jun 7, 2026

Summary

The init method previously contained two different logics:

  1. It set up the internal state of default apps and app order
  2. It resolved the app navigation entries

The 1. is needed before add can be called, so it was always called by the add method, but this also resolved all appinfo.xml entries on the first add call even if never used.
The 2. is only needed when the navigations are actually fetched.

This splits the logic into two functions:

  • init for the bare initialization
  • resolveAppNavigationEntries for resolving the entries when requesting to output them.

This should give a small performance improvement for API calls and fixes a problem when navigations are added before all apps are registered.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@susnux susnux added this to the Nextcloud 35 milestone Jun 7, 2026
@susnux susnux requested review from a team as code owners June 7, 2026 14:01
@susnux susnux requested review from nfebe, skjnldsv and sorbaugh and removed request for a team June 7, 2026 14:01
@susnux susnux added bug 3. to review Waiting for reviews labels Jun 7, 2026
@susnux susnux requested review from artonge and leftybournes and removed request for a team June 7, 2026 14:01
susnux added 2 commits June 7, 2026 16:54
The `init` method previously contained two different logics:
1. It set up the internal state of default apps and app order
2. It resolved the app navigation entries

The 1. is needed before `add` can be called, so it was always called by
the `add` method, but this also resolved all appinfo.xml entries on the
first `add` call even if never used.
The 2. is only needed when the navigations are actually fetched.

This splits the logic into two functions:
- `init` for the bare initialization
- `resolveAppNavigationEntries` for resolving the entries when
  requesting to output them.

This should give a small performance improvement for API calls and fixes
a problem when navigations are added before all apps are registered.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant