mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user