mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 20:41:56 +08:00
update example
This commit is contained in:
parent
7d0f7f4652
commit
af5abda8b1
@ -8,6 +8,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/wailsapp/wails/v3/pkg/application"
|
"github.com/wailsapp/wails/v3/pkg/application"
|
||||||
|
"github.com/wailsapp/wails/v3/pkg/events"
|
||||||
"github.com/wailsapp/wails/v3/pkg/services/notifications"
|
"github.com/wailsapp/wails/v3/pkg/services/notifications"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -61,6 +62,7 @@ func main() {
|
|||||||
URL: "/",
|
URL: "/",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
app.OnApplicationEvent(events.Common.ApplicationStarted, func(event *application.ApplicationEvent) {
|
||||||
// Create a goroutine that spawns desktop notifications from Go
|
// Create a goroutine that spawns desktop notifications from Go
|
||||||
go func() {
|
go func() {
|
||||||
var authorized bool
|
var authorized bool
|
||||||
@ -140,6 +142,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
})
|
||||||
|
|
||||||
// Run the application. This blocks until the application has been exited.
|
// Run the application. This blocks until the application has been exited.
|
||||||
err := app.Run()
|
err := app.Run()
|
||||||
|
Loading…
Reference in New Issue
Block a user