mirror of
https://github.com/ArcaneChat/core.git
synced 2026-07-03 14:05:33 +02: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:
+3
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user