From 359dcbf70c4c9a9c41a08ed3bdcfc699f86a5f47 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Tue, 23 Mar 2021 06:52:31 -0300 Subject: [PATCH] Add support for adaptive Windows 10 notifications --- .../src/toast_notification_builder.vala | 208 ++++++++++++------ .../src/win_notification_provider.vala | 8 +- 2 files changed, 147 insertions(+), 69 deletions(-) diff --git a/plugins/windows-notification/src/toast_notification_builder.vala b/plugins/windows-notification/src/toast_notification_builder.vala index c8a24b51..a993955c 100644 --- a/plugins/windows-notification/src/toast_notification_builder.vala +++ b/plugins/windows-notification/src/toast_notification_builder.vala @@ -6,9 +6,22 @@ using Xmpp; namespace Dino.Plugins.WindowsNotification { private delegate void NodeFunction(StanzaNode node); + + public enum ActivationType { + Foreground, + Background + } + + public enum Scenario { + Basic, + IncomingCall + } + private class Button { public string title; public string arguments; + public string imageUri; + public ActivationType activationType; } public class ToastNotificationBuilder { @@ -16,13 +29,15 @@ namespace Dino.Plugins.WindowsNotification { private Gee.List