Commit 952374aab0
Unregistered key
Layout: unified · split
src/notifications.rs +4 −1
| @@ -118,6 +118,9 @@ fn send_notification_desktop(summary: &str, body: Option<&str>) { | ||
| 118 | 118 | .icon(IAMB_XDG_NAME) |
| 119 | 119 | .action("default", "default"); |
| 120 | 120 | |
| 121 | #[cfg(all(unix, not(target_os = "macos")))] | |
| 122 | desktop_notification.urgency(notify_rust::Urgency::Normal); | |
| 123 | ||
| 121 | 124 | if let Some(body) = body { |
| 122 | 125 | desktop_notification.body(body); |
| 123 | 126 | } |
| @@ -260,7 +263,7 @@ pub fn event_notification_body(event: &AnySyncTimelineEvent, sender_name: &str) | ||
| 260 | 263 | } |
| 261 | 264 | |
| 262 | 265 | fn truncate(s: String) -> String { |
| 263 | static MAX_LENGTH: usize = 100; | |
| 266 | static MAX_LENGTH: usize = 5000; | |
| 264 | 267 | if s.graphemes(true).count() > MAX_LENGTH { |
| 265 | 268 | let truncated: String = s.graphemes(true).take(MAX_LENGTH).collect(); |
| 266 | 269 | truncated + "..." |