[client] Address review: settings tab readiness, dock reopen cancel scope, update URL escaping

This commit is contained in:
Zoltán Papp
2026-08-18 15:08:39 +02:00
parent db63ef978f
commit e8eb65b7c4
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -381,10 +381,10 @@ func registerDockReopenHook(app *application.App, wm *services.WindowManager) {
return return
} }
app.Event.RegisterApplicationEventHook(events.Mac.ApplicationShouldHandleReopen, func(e *application.ApplicationEvent) { app.Event.RegisterApplicationEventHook(events.Mac.ApplicationShouldHandleReopen, func(e *application.ApplicationEvent) {
e.Cancel()
if e.Context().HasVisibleWindows() { if e.Context().HasVisibleWindows() {
return return
} }
e.Cancel()
wm.ShowMain() wm.ShowMain()
}) })
} }
+3 -2
View File
@@ -196,12 +196,13 @@ func (s *WindowManager) OpenSettings(tab string) {
s.armReady(s.settings) s.armReady(s.settings)
} }
w := s.settings w := s.settings
if fresh { ready := s.ready[w.ID()]
if !ready {
s.pendingTab[w.ID()] = target s.pendingTab[w.ID()] = target
} }
s.mu.Unlock() s.mu.Unlock()
if !fresh { if ready {
s.app.Event.Emit(EventSettingsOpen, target) s.app.Event.Emit(EventSettingsOpen, target)
} }
s.showWhenReady(w) s.showWhenReady(w)
+2 -1
View File
@@ -4,6 +4,7 @@ package main
import ( import (
"context" "context"
neturl "net/url"
"sync" "sync"
"time" "time"
@@ -190,7 +191,7 @@ func (u *trayUpdater) openProgressWindow(version string) {
} }
url := "/#/update" url := "/#/update"
if version != "" { if version != "" {
url += "?version=" + version url += "?version=" + neturl.QueryEscape(version)
} }
u.showMainAt(url) u.showMainAt(url)
} }