Move no-op rationale into empty function bodies

Replace the doc comments above the empty no-op stubs (bindTrayClick,
startTrayTheme, noopSessionWatcher.Dismiss/Close) with short in-body
comments explaining why each is empty.
This commit is contained in:
Zoltán Papp
2026-06-08 17:34:18 +02:00
parent b598274424
commit 43175e0730
3 changed files with 15 additions and 18 deletions

View File

@@ -35,5 +35,10 @@ func (w noopSessionWatcher) Update(deadline time.Time) error {
return nil
}
func (noopSessionWatcher) Dismiss() {}
func (noopSessionWatcher) Close() {}
func (noopSessionWatcher) Dismiss() {
// No-op: only suppresses the timer-driven final-warning, which this stub never arms.
}
func (noopSessionWatcher) Close() {
// No-op: no timers to stop and no state to unwind; the recorder is cleared via Update(zero).
}

View File

@@ -2,12 +2,7 @@
package main
// bindTrayClick is a no-op on macOS and Linux. On macOS the native
// NSStatusItem auto-shows the menu on left-click; on Linux the
// StatusNotifierItem host paints the menu independently. Binding an
// OnClick→OpenMenu handler is both unnecessary there and actively harmful on
// macOS, where OpenMenu routes through NSStatusItem's blocking [button
// mouseDown:] on the serial main GCD queue and freezes the tray and webview
// until the menu closes (commit c77e5cef8). Windows opts in via the sibling
// tray_click_windows.go file.
func bindTrayClick(*Tray) {}
func bindTrayClick(*Tray) {
// No-op: macOS/Linux native trays open the menu on click themselves.
// Only Windows needs an explicit handler (tray_click_windows.go).
}

View File

@@ -2,10 +2,7 @@
package main
// startTrayTheme is a no-op off Linux: macOS uses template icons (the OS
// recolours them per menubar appearance) and Windows ships colored PNGs, so
// neither needs the freedesktop colour-scheme probe that the Linux build
// uses to choose between the black and white monochrome silhouettes. Left
// callable so NewTray can invoke it unconditionally; panelDark stays nil and
// panelIsDark returns its default.
func (t *Tray) startTrayTheme() {}
func (t *Tray) startTrayTheme() {
// No-op off Linux: macOS template icons and Windows colored PNGs need no
// colour-scheme probe. panelDark stays nil; panelIsDark uses its default.
}