Commit 952374aab0

952374aab05e0a650a6c19e4d2ae29279ca9632b

parent: e99674b245

Unregistered key

VAWVAW <94846592+VAWVAW@users.noreply.github.com> · 2025-05-30 02:28 UTC
committer: <noreply@github.com>

Show more text in notifications and use "normal" urgency for dbus notifications (#430)

Layout: unified · split

src/notifications.rs +4 −1
@@ -118,6 +118,9 @@ fn send_notification_desktop(summary: &str, body: Option<&str>) {
118118 .icon(IAMB_XDG_NAME)
119119 .action("default", "default");
120120
121 #[cfg(all(unix, not(target_os = "macos")))]
122 desktop_notification.urgency(notify_rust::Urgency::Normal);
123
121124 if let Some(body) = body {
122125 desktop_notification.body(body);
123126 }
@@ -260,7 +263,7 @@ pub fn event_notification_body(event: &AnySyncTimelineEvent, sender_name: &str)
260263}
261264
262265fn truncate(s: String) -> String {
263 static MAX_LENGTH: usize = 100;
266 static MAX_LENGTH: usize = 5000;
264267 if s.graphemes(true).count() > MAX_LENGTH {
265268 let truncated: String = s.graphemes(true).take(MAX_LENGTH).collect();
266269 truncated + "..."