feat(app): implement basic function
General - 配置界面支持配置对象存储桶 - 快捷键进入截图 - 一键上传截图 & 复制截图链接 MacOS - 状态栏指示器和应用图标
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
//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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user