[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

View File

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

View File

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

View File

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