diff --git a/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp b/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp index 9d5173e1..2367422b 100644 --- a/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp +++ b/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp @@ -95,6 +95,16 @@ static void winrt_windows_ui_notifications_toast_notification_finalize(GObject* g_object_unref(token); } + for (const auto& item : priv->notification->dismissed) + { + auto token = item->token; + if (winrt_event_token_operator_bool(token)) + { + priv->notification->data.Dismissed(*winrt_event_token_get_internal(token)); + } + g_object_unref(token); + } + delete priv->notification; G_OBJECT_CLASS(winrt_windows_ui_notifications_toast_notification_parent_class)->dispose(self);