Show more text in notifications and use "normal" urgency for dbus notifications (#430)
This commit is contained in:
@@ -118,6 +118,9 @@ fn send_notification_desktop(summary: &str, body: Option<&str>) {
|
|||||||
.icon(IAMB_XDG_NAME)
|
.icon(IAMB_XDG_NAME)
|
||||||
.action("default", "default");
|
.action("default", "default");
|
||||||
|
|
||||||
|
#[cfg(all(unix, not(target_os = "macos")))]
|
||||||
|
desktop_notification.urgency(notify_rust::Urgency::Normal);
|
||||||
|
|
||||||
if let Some(body) = body {
|
if let Some(body) = body {
|
||||||
desktop_notification.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 {
|
fn truncate(s: String) -> String {
|
||||||
static MAX_LENGTH: usize = 100;
|
static MAX_LENGTH: usize = 5000;
|
||||||
if s.graphemes(true).count() > MAX_LENGTH {
|
if s.graphemes(true).count() > MAX_LENGTH {
|
||||||
let truncated: String = s.graphemes(true).take(MAX_LENGTH).collect();
|
let truncated: String = s.graphemes(true).take(MAX_LENGTH).collect();
|
||||||
truncated + "..."
|
truncated + "..."
|
||||||
|
|||||||
Reference in New Issue
Block a user