diff --git a/src/chat.rs b/src/chat.rs index 73d98e475..2debcf535 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -12,7 +12,6 @@ use serde::{Deserialize, Serialize}; use crate::aheader::EncryptPreference; use crate::blob::{BlobError, BlobObject}; -use crate::chatlist::dc_get_archived_cnt; use crate::color::str_to_color; use crate::config::Config; use crate::constants::{ @@ -892,9 +891,7 @@ impl Chat { .context(format!("Failed loading chat {} from database", chat_id))?; if chat.id.is_archived_link() { - let tempname = stock_str::archived_chats(context).await; - let cnt = dc_get_archived_cnt(context).await?; - chat.name = format!("{} ({})", tempname, cnt); + chat.name = stock_str::archived_chats(context).await; } else { if chat.typ == Chattype::Single { let mut chat_name = "Err [Name not found]".to_owned(); @@ -3033,7 +3030,7 @@ pub(crate) async fn add_info_msg(context: &Context, chat_id: ChatId, text: impl mod tests { use super::*; - use crate::chatlist::Chatlist; + use crate::chatlist::{dc_get_archived_cnt, Chatlist}; use crate::constants::{DC_GCL_ARCHIVED_ONLY, DC_GCL_NO_SPECIALS}; use crate::contact::Contact; use crate::dc_receive_imf::dc_receive_imf;