feat: Add 📱 to all webxdc summaries (#7790)

This can be done now as Desktop doesn't prepend icons from webxdc archives to summaries anymore.
This commit is contained in:
iequidoo
2026-02-04 08:11:43 -03:00
committed by iequidoo
parent bbf9a86bce
commit 4041d9a54e
2 changed files with 4 additions and 5 deletions

View File

@@ -221,9 +221,9 @@ impl Message {
append_text = true
}
Viewtype::Webxdc => {
emoji = Some("📱");
type_name = None;
if self.viewtype == Viewtype::Webxdc {
emoji = None;
type_file = Some(
self.get_webxdc_info(context)
.await
@@ -231,7 +231,6 @@ impl Message {
.unwrap_or_else(|_| "ErrWebxdcName".to_string()),
);
} else {
emoji = Some("📱");
type_file = Some(viewtype.to_locale_string(context).await);
}
append_text = true;
@@ -426,10 +425,10 @@ mod tests {
.unwrap();
chat_id.set_draft(ctx, Some(&mut msg)).await.unwrap();
assert_eq!(msg.viewtype, Viewtype::Webxdc);
assert_summary_texts(&msg, ctx, "nice app!").await;
assert_summary_texts(&msg, ctx, "📱 nice app!").await;
msg.set_text(some_text.clone());
chat_id.set_draft(ctx, Some(&mut msg)).await.unwrap();
assert_summary_texts(&msg, ctx, "nice app! \u{2013} bla bla").await;
assert_summary_texts(&msg, ctx, "📱 nice app! \u{2013} bla bla").await;
let file = write_file_to_blobdir(&d).await;
let mut msg = Message::new(Viewtype::File);