5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-20 10:59:30 +08:00

for review

This commit is contained in:
Zach Botterman 2025-02-24 17:58:05 -08:00
parent be716fc0ee
commit 8da998191a

View File

@ -36,15 +36,17 @@ func (ns *Service) ServiceName() string {
// ServiceStartup is called when the service is loaded // ServiceStartup is called when the service is loaded
// Sets an activation callback to emit an event when notifications are interacted with. // Sets an activation callback to emit an event when notifications are interacted with.
func (ns *Service) ServiceStartup(ctx context.Context, options application.ServiceOptions) error { func (ns *Service) ServiceStartup(ctx context.Context, options application.ServiceOptions) error {
toast.SetAppData(toast.AppData{ // Need to get App Name and generate a UUID on first launch
AppID: "Notifications", //
GUID: "{8F2E1A3D-C497-42B6-9E5D-72F8A169B051}", // toast.SetAppData(toast.AppData{
IconPath: "C:\\Users\\Zach\\Development\\notifications_demo\\build\\appicon.ico", // AppID: "Notifications",
ActivationExe: "C:\\Users\\Zach\\Development\\notifications_demo\\bin\\Notifications.exe", // GUID: "{8F2E1A3D-C497-42B6-9E5D-72F8A169B051}",
}) // IconPath: "C:\\Users\\Zach\\Development\\notifications_demo\\build\\appicon.ico",
// ActivationExe: "C:\\Users\\Zach\\Development\\notifications_demo\\bin\\Notifications.exe",
// })
//
toast.SetActivationCallback(func(args string, data []toast.UserData) { toast.SetActivationCallback(func(args string, data []toast.UserData) {
println("HERE!")
actionIdentifier, userInfo := parseNotificationResponse(args) actionIdentifier, userInfo := parseNotificationResponse(args)
response := NotificationResponse{ response := NotificationResponse{
Name: "notification", Name: "notification",