From d4c90e892bd446d2de1de860fe1263100f990429 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Tue, 17 Oct 2023 15:25:06 +0200 Subject: [PATCH] Don't provide default broadcast icon, because on the receiving side there also won't be any icon (broadcast lists are mailing lists on the receiving side) --- src/chat.rs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 5f2580cbf..389511eef 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1443,10 +1443,6 @@ impl Chat { return contact.get_profile_image(context).await; } } - } else if self.typ == Chattype::Broadcast { - if let Ok(image_rel) = get_broadcast_icon(context).await { - return Ok(Some(get_abs_path(context, Path::new(&image_rel)))); - } } Ok(None) } @@ -1941,21 +1937,6 @@ pub(crate) async fn update_device_icon(context: &Context) -> Result<()> { Ok(()) } -pub(crate) async fn get_broadcast_icon(context: &Context) -> Result { - if let Some(icon) = context.sql.get_raw_config("icon-broadcast").await? { - return Ok(icon); - } - - let icon = include_bytes!("../assets/icon-broadcast.png"); - let blob = BlobObject::create(context, "icon-broadcast.png", icon).await?; - let icon = blob.as_name().to_string(); - context - .sql - .set_raw_config("icon-broadcast", Some(&icon)) - .await?; - Ok(icon) -} - pub(crate) async fn get_archive_icon(context: &Context) -> Result { if let Some(icon) = context.sql.get_raw_config("icon-archive").await? { return Ok(icon);