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)

This commit is contained in:
Hocuri
2023-10-17 15:25:06 +02:00
parent 8573649bf7
commit d4c90e892b

View File

@@ -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<String> {
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<String> {
if let Some(icon) = context.sql.get_raw_config("icon-archive").await? {
return Ok(icon);