From e9b013412a69bb76bfb248b6a7d0b0356fe8add1 Mon Sep 17 00:00:00 2001 From: Flavio Fois Date: Thu, 5 Feb 2026 12:39:33 +0100 Subject: [PATCH] feat: enhance startup logging for viewer mode detection --- app.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index d8b2cba..13d23ac 100644 --- a/app.go +++ b/app.go @@ -44,7 +44,20 @@ func NewApp() *App { // so we can call the runtime methods func (a *App) startup(ctx context.Context) { a.ctx = ctx - Log("Wails startup") + + isViewer := false + for _, arg := range os.Args { + if strings.Contains(arg, "--view-image") || strings.Contains(arg, "--view-pdf") { + isViewer = true + break + } + } + + if isViewer { + Log("Second instance launch") + } else { + Log("Wails startup") + } } func (a *App) GetConfig() *utils.Config {