From 57870ec54a2f2f7ccd5279617c525f8f50f6931e Mon Sep 17 00:00:00 2001 From: bjoern Date: Wed, 28 Jul 2021 17:53:12 +0200 Subject: [PATCH] remove archived count suffix (#2566) "Archived Chats" also contain old contact requests now (an maybe new one if the user archives them), so, there may be easily some thousands chats in "Archived Chats" - and the count has no real meaning to the user, esp. as we not even display the number of "Real Chats". Might be that this "Link" will go away anyway sooner or later, however, for now, it is just fine to remove the badge counter. --- src/chat.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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;