From 952374aab05e0a650a6c19e4d2ae29279ca9632b Mon Sep 17 00:00:00 2001 From: VAWVAW <94846592+VAWVAW@users.noreply.github.com> Date: Fri, 30 May 2025 02:28:08 +0000 Subject: [PATCH] Show more text in notifications and use "normal" urgency for dbus notifications (#430) --- src/notifications.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/notifications.rs b/src/notifications.rs index a3667f5..c120222 100644 --- a/src/notifications.rs +++ b/src/notifications.rs @@ -118,6 +118,9 @@ fn send_notification_desktop(summary: &str, body: Option<&str>) { .icon(IAMB_XDG_NAME) .action("default", "default"); + #[cfg(all(unix, not(target_os = "macos")))] + desktop_notification.urgency(notify_rust::Urgency::Normal); + if let Some(body) = body { desktop_notification.body(body); } @@ -260,7 +263,7 @@ pub fn event_notification_body(event: &AnySyncTimelineEvent, sender_name: &str) } fn truncate(s: String) -> String { - static MAX_LENGTH: usize = 100; + static MAX_LENGTH: usize = 5000; if s.graphemes(true).count() > MAX_LENGTH { let truncated: String = s.graphemes(true).take(MAX_LENGTH).collect(); truncated + "..."