mark all archived read (#3919)

* let marknoticed_chat() work for DC_CHAT_ID_ARCHIVED_LINK

* fix test_util::get_last_msg() - the first position may be the archive-link if 'adding specials' is allowed

* add a test for the archived-link message counter

* update CHANGELOG
This commit is contained in:
bjoern
2023-01-06 11:22:30 +01:00
committed by GitHub
parent 3986bb6c4e
commit eba96eb904
3 changed files with 141 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ use crate::chat::{self, Chat, ChatId};
use crate::chatlist::Chatlist;
use crate::config::Config;
use crate::constants::Chattype;
use crate::constants::{DC_GCM_ADDDAYMARKER, DC_MSG_ID_DAYMARKER};
use crate::constants::{DC_GCL_NO_SPECIALS, DC_GCM_ADDDAYMARKER, DC_MSG_ID_DAYMARKER};
use crate::contact::{Contact, ContactId, Modifier, Origin};
use crate::context::Context;
use crate::events::{Event, EventType, Events};
@@ -502,7 +502,7 @@ impl TestContext {
/// Gets the most recent message over all chats.
pub async fn get_last_msg(&self) -> Message {
let chats = Chatlist::try_load(&self.ctx, 0, None, None)
let chats = Chatlist::try_load(&self.ctx, DC_GCL_NO_SPECIALS, None, None)
.await
.expect("failed to load chatlist");
// 0 is correct in the next line (as opposed to `chats.len() - 1`, which would be the last element):