in summary, show hyphen only if there is a type and a text; this avoids summaries as 'Voice message -'

This commit is contained in:
B. Petersen
2019-10-26 23:32:05 +02:00
parent 7916a7fa07
commit d223a286c0

View File

@@ -850,7 +850,9 @@ pub fn get_summarytext_by_raw(
}
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()
} else {
let tmp = format!("{} {}", prefix, text.as_ref());