diff --git a/src/summary.rs b/src/summary.rs index 35aff3004..9b0c5e154 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -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); diff --git a/src/webxdc/webxdc_tests.rs b/src/webxdc/webxdc_tests.rs index cf72c459d..7590a0c33 100644 --- a/src/webxdc/webxdc_tests.rs +++ b/src/webxdc/webxdc_tests.rs @@ -1602,7 +1602,7 @@ async fn test_webxdc_chatlist_summary() -> Result<()> { let chatlist = Chatlist::try_load(&t, 0, None, None).await?; assert_eq!(chatlist.len(), 1); let summary = chatlist.get_summary(&t, 0, None).await?; - assert_eq!(summary.text, "nice app!".to_string()); + assert_eq!(summary.text, "📱 nice app!".to_string()); assert_eq!(summary.thumbnail_path.unwrap(), "webxdc-icon://last-msg-id"); Ok(())