From e8eb65b7c4c66ded06f92f7b70e6711e9bbbf190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Tue, 18 Aug 2026 15:08:39 +0200 Subject: [PATCH] [client] Address review: settings tab readiness, dock reopen cancel scope, update URL escaping --- client/ui/main.go | 2 +- client/ui/services/windowmanager.go | 5 +++-- client/ui/tray_update.go | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/ui/main.go b/client/ui/main.go index 43ac0e5da..1861177eb 100644 --- a/client/ui/main.go +++ b/client/ui/main.go @@ -381,10 +381,10 @@ func registerDockReopenHook(app *application.App, wm *services.WindowManager) { return } app.Event.RegisterApplicationEventHook(events.Mac.ApplicationShouldHandleReopen, func(e *application.ApplicationEvent) { - e.Cancel() if e.Context().HasVisibleWindows() { return } + e.Cancel() wm.ShowMain() }) } diff --git a/client/ui/services/windowmanager.go b/client/ui/services/windowmanager.go index 554a1d7ad..71e8b1c8e 100644 --- a/client/ui/services/windowmanager.go +++ b/client/ui/services/windowmanager.go @@ -196,12 +196,13 @@ func (s *WindowManager) OpenSettings(tab string) { s.armReady(s.settings) } w := s.settings - if fresh { + ready := s.ready[w.ID()] + if !ready { s.pendingTab[w.ID()] = target } s.mu.Unlock() - if !fresh { + if ready { s.app.Event.Emit(EventSettingsOpen, target) } s.showWhenReady(w) diff --git a/client/ui/tray_update.go b/client/ui/tray_update.go index f99afbae0..3ce1f9600 100644 --- a/client/ui/tray_update.go +++ b/client/ui/tray_update.go @@ -4,6 +4,7 @@ package main import ( "context" + neturl "net/url" "sync" "time" @@ -190,7 +191,7 @@ func (u *trayUpdater) openProgressWindow(version string) { } url := "/#/update" if version != "" { - url += "?version=" + version + url += "?version=" + neturl.QueryEscape(version) } u.showMainAt(url) }