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) }