[client] Add support for disabling profiles feature via command line flag (#4235)

* Add support for disabling profiles feature via command line flag

* Add profiles disabling flag to service command

* Refactor profile menu initialization and enhance error notifications in event handlers
This commit is contained in:
hakansa
2025-07-29 13:03:15 +03:00
committed by GitHub
parent e1c66a8124
commit 8c8473aed3
9 changed files with 117 additions and 32 deletions

View File

@@ -802,7 +802,21 @@ func (s *serviceClient) onTrayReady() {
profileMenuItem := systray.AddMenuItem("", "")
emailMenuItem := systray.AddMenuItem("", "")
s.mProfile = newProfileMenu(s.ctx, s.profileManager, *s.eventHandler, profileMenuItem, emailMenuItem, s.menuDownClick, s.menuUpClick, s.getSrvClient, s.loadSettings)
newProfileMenuArgs := &newProfileMenuArgs{
ctx: s.ctx,
profileManager: s.profileManager,
eventHandler: s.eventHandler,
profileMenuItem: profileMenuItem,
emailMenuItem: emailMenuItem,
downClickCallback: s.menuDownClick,
upClickCallback: s.menuUpClick,
getSrvClientCallback: s.getSrvClient,
loadSettingsCallback: s.loadSettings,
app: s.app,
}
s.mProfile = newProfileMenu(*newProfileMenuArgs)
systray.AddSeparator()
s.mUp = systray.AddMenuItem("Connect", "Connect")