From ef7be1b8a2751c3a1904f465833f98770103b7c4 Mon Sep 17 00:00:00 2001 From: szymon Date: Wed, 30 Sep 2026 14:10:18 +0200 Subject: [PATCH] feat: implement set_urgency --- src/notification.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/notification.rs b/src/notification.rs index f5cf92d..a8ae8d3 100644 --- a/src/notification.rs +++ b/src/notification.rs @@ -238,7 +238,13 @@ impl<'a> Notification { /// Sets the urgency level of this notification pub fn set_urgency(&mut self, urgency: Urgency) { - todo!(); + let urgency: u32 = match urgency { + Urgency::Low => NotifyUrgency_NOTIFY_URGENCY_LOW, + Urgency::Normal => NotifyUrgency_NOTIFY_URGENCY_NORMAL, + Urgency::Critical => NotifyUrgency_NOTIFY_URGENCY_CRITICAL, + }; + + unsafe { notify_notification_set_urgency(self.inner, urgency) } } /// Tells the notification server to display the notification on the screen