From ce9fc1e0db0b48a08facf1dc2eded2dd572065e9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Mar 2024 11:43:44 +0300 Subject: fixes #4271 (contact list to remove "Unread messages" extra icon when a history is cleared for a specified contact) --- src/mir_app/src/srmm_main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mir_app/src/srmm_main.cpp b/src/mir_app/src/srmm_main.cpp index c78da36ffb..2499505bb6 100644 --- a/src/mir_app/src/srmm_main.cpp +++ b/src/mir_app/src/srmm_main.cpp @@ -99,10 +99,14 @@ static INT_PTR svcEmptyHistory(WPARAM hContact, LPARAM lParam) while (pCursor.FetchNext()) pCursor.DeleteEvent(); - if (Contact::IsGroupChat(hContact)) + if (Contact::IsGroupChat(hContact)) { if (auto *si = SM_FindSessionByContact(hContact)) Chat_EmptyHistory(si); + if (auto *szProto = Proto_GetBaseAccountName(hContact)) + db_unset(hContact, szProto, "ApparentMode"); + } + if (dlg.bDelHistory) CallContactService(hContact, PS_EMPTY_SRV_HISTORY, hContact, CDF_DEL_HISTORY | (dlg.bForEveryone ? CDF_FOR_EVERYONE : 0)); return 0; -- cgit v1.2.3