Files
mamamiyear ceecbb6af4 feat(app): implement basic function
General
- 配置界面支持配置对象存储桶
- 快捷键进入截图
- 一键上传截图 & 复制截图链接

MacOS
- 状态栏指示器和应用图标
2026-06-01 21:17:29 +08:00

17 lines
557 B
Go

//go:build !darwin
package tray
// dispatchOnMain is a no-op on non-darwin platforms because:
// - On Linux (GTK/AppIndicator), systray.Run / nativeStart can be invoked
// from any goroutine; the GTK runloop is started internally.
// - On Windows, status icons are tied to a hidden window owned by the
// systray library itself, also independent of the Go main goroutine.
// Wrapping the call in dispatchOnMain on these platforms would just add a
// pointless layer of indirection.
func dispatchOnMain(fn func()) {
if fn != nil {
fn()
}
}