Skip to content
Discussion options

You must be logged in to vote

I did not try it (you can expect better support and faster response time if you prepare a public repository with your changes) but there is a PreferenceService#ready, once the promise resolved, you do the menu registry modifications. Note, you won't be able to use the registerMenus hooks, as they're sync.

Can you try something like this:

class YourFrontentContribution implements FrontendApplicationContributions {

  @inject (PreferenceService) protected readonly ps: PreferenceService;
  @inject (MenuModelRegistry) protected readonly mr: MenuModelRegisytr;

  onStart(): Promise<void> {
    await this.ps.ready;
    //  get the preference values
   this.mr.unregister
   this.mr.register
  }
}

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
11 replies
@CarlosSun
Comment options

@kittaakos
Comment options

@CarlosSun
Comment options

@kittaakos
Comment options

@CarlosSun
Comment options

Answer selected by CarlosSun
Comment options

You must be logged in to vote
1 reply
@kittaakos
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants