Remove redundant Darwin tray stub (#1694)
This commit is contained in:
parent
3e33d1053c
commit
6f304362f6
1 changed files with 0 additions and 32 deletions
|
|
@ -1,32 +0,0 @@
|
||||||
//go:build darwin && !cgo
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/sipeed/picoclaw/pkg/logger"
|
|
||||||
)
|
|
||||||
|
|
||||||
func runTray() {
|
|
||||||
logger.Infof("System tray is unavailable in darwin builds without cgo; running without tray")
|
|
||||||
|
|
||||||
if !*noBrowser {
|
|
||||||
go func() {
|
|
||||||
time.Sleep(browserDelay)
|
|
||||||
if err := openBrowser(); err != nil {
|
|
||||||
logger.Errorf("Warning: Failed to auto-open browser: %v", err)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
|
||||||
defer stop()
|
|
||||||
|
|
||||||
<-ctx.Done()
|
|
||||||
shutdownApp()
|
|
||||||
}
|
|
||||||
Loading…
Add table
Reference in a new issue