mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
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:
19
src/chat.rs
19
src/chat.rs
@@ -1443,10 +1443,6 @@ impl Chat {
|
|||||||
return contact.get_profile_image(context).await;
|
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)
|
Ok(None)
|
||||||
}
|
}
|
||||||
@@ -1941,21 +1937,6 @@ pub(crate) async fn update_device_icon(context: &Context) -> Result<()> {
|
|||||||
Ok(())
|
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> {
|
pub(crate) async fn get_archive_icon(context: &Context) -> Result<String> {
|
||||||
if let Some(icon) = context.sql.get_raw_config("icon-archive").await? {
|
if let Some(icon) = context.sql.get_raw_config("icon-archive").await? {
|
||||||
return Ok(icon);
|
return Ok(icon);
|
||||||
|
|||||||
Reference in New Issue
Block a user