mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +03:00
Refactor hiding of expired messages
Now there is only one function: hide_device_expired_messages(). If any messages are hidden event DC_EVENT_MSGS_CHANGED(0,0) is emitted now, which is more correct than DC_EVENT_CHAT_MODIFIED and also triggers chatlist reload.
This commit is contained in:
@@ -92,7 +92,9 @@ impl Chatlist {
|
||||
query: Option<&str>,
|
||||
query_contact_id: Option<u32>,
|
||||
) -> Result<Self> {
|
||||
delete_device_expired_messages_all_chats(context)?;
|
||||
// Note that we do not emit DC_EVENT_MSGS_MODIFIED here even if some
|
||||
// messages get hidden to avoid reloading the same chatlist.
|
||||
hide_device_expired_messages(context)?;
|
||||
|
||||
let mut add_archived_link_item = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user