mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
in summary, show hyphen only if there is a type and a text; this avoids summaries as 'Voice message -'
This commit is contained in:
@@ -850,7 +850,9 @@ pub fn get_summarytext_by_raw(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Some(text) = text {
|
if let Some(text) = text {
|
||||||
if prefix.is_empty() {
|
if text.as_ref().is_empty() {
|
||||||
|
prefix
|
||||||
|
} else if prefix.is_empty() {
|
||||||
dc_truncate(text.as_ref(), approx_characters, true).to_string()
|
dc_truncate(text.as_ref(), approx_characters, true).to_string()
|
||||||
} else {
|
} else {
|
||||||
let tmp = format!("{} – {}", prefix, text.as_ref());
|
let tmp = format!("{} – {}", prefix, text.as_ref());
|
||||||
|
|||||||
Reference in New Issue
Block a user