Wire KeepRunningInTray to runtime so tray, close, and autostart follow the saved setting.

Autostart entries pass --start-in-tray only when the tray is enabled; Settings warns that the notification icon needs a restart (Fyne limitation).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 22:44:02 +03:00
parent 5170cc5f99
commit 5b0e6fe51b
22 changed files with 356 additions and 97 deletions
+14
View File
@@ -0,0 +1,14 @@
package ui
import "testing"
func TestResolveStartHiddenUsesDomainHelper(t *testing.T) {
// resolveStartHidden is the UI alias used at startup; it must stay aligned
// with domain.ResolveStartHidden so run.go and tests share one definition.
if got := resolveStartHidden(true, false); got {
t.Fatal("expected hidden start to require both CLI flag and keepInTray")
}
if !resolveStartHidden(true, true) {
t.Fatal("expected hidden start when both flags are set")
}
}