mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
refactor(app): 优化系统托盘相关代码
- 移除了 systray.Run 函数的冗余 goroutine - 删除了多余的空行,提高了代码可读性
This commit is contained in:
parent
c9a8192d60
commit
97b5faee4a
3
app.go
3
app.go
@ -41,7 +41,7 @@ func (a *App) startup(ctx context.Context) {
|
||||
a.ctx = ctx
|
||||
|
||||
// 创建系统托盘
|
||||
go systray.Run(func() {
|
||||
systray.Run(func() {
|
||||
onReady(a)
|
||||
}, func() {
|
||||
onExit(a)
|
||||
@ -430,7 +430,6 @@ func onReady(a *App) {
|
||||
systray.SetIcon(icon2)
|
||||
systray.SetTitle("go-stock")
|
||||
systray.SetTooltip("go-stock 股票行情实时获取")
|
||||
|
||||
// 创建菜单项
|
||||
show := systray.AddMenuItem("显示", "显示应用程序")
|
||||
//hide := systray.AddMenuItem("隐藏", "隐藏应用程序")
|
||||
|
Loading…
x
Reference in New Issue
Block a user