summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-03-06 11:43:44 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-03-06 11:43:44 +0300
commitce9fc1e0db0b48a08facf1dc2eded2dd572065e9 (patch)
tree2c5b9ad956848cac618976c693de609dc5a64743
parent636101ab497c881e2699404c41cd767392d8d889 (diff)
fixes #4271 (contact list to remove "Unread messages" extra icon when a history is cleared for a specified contact)
-rw-r--r--src/mir_app/src/srmm_main.cpp6
1 files changed, 5 insertions, 1 deletions
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;