feat: implement set_urgency

This commit is contained in:
2026-09-30 14:10:18 +02:00
parent a3def74076
commit ef7be1b8a2

View File

@@ -238,7 +238,13 @@ impl<'a> Notification {
/// Sets the urgency level of this notification /// Sets the urgency level of this notification
pub fn set_urgency(&mut self, urgency: Urgency) { 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 /// Tells the notification server to display the notification on the screen