From 15c49e3fc4cf033fffbf79e9f68a0405d5a95d14 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 26 Sep 2019 22:15:57 +0300 Subject: Clist_IsHidden / Clist_HideContact - two helpers to hide CList/Hidden variable and unify access to it --- plugins/TabSRMM/src/chat_tools.cpp | 4 ++-- plugins/TabSRMM/src/typingnotify.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index 79e173ec07..c92e11d842 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -309,8 +309,8 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight if (bHighlight) { gce->iType |= GC_EVENT_HIGHLIGHT; params->sound = "ChatHighlight"; - if (db_get_b(si->hContact, "CList", "Hidden", 0) != 0) - db_unset(si->hContact, "CList", "Hidden"); + if (Clist_IsHidden(si->hContact) != 0) + Clist_HideContact(si->hContact, false); if (params->bInactive) { bFlagUnread = true; DoTrayIcon(si, gce); diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index f9a92d12fb..2a4f630dbb 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -81,7 +81,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA void TN_TypingMessage(MCONTACT hContact, int iMode) { // hidden & ignored contacts check - if (db_get_b(hContact, "CList", "Hidden", 0) || (db_get_dw(hContact, "Ignore", "Mask1", 0) & 1)) // 9 - online notification + if (Clist_IsHidden(hContact) || (db_get_dw(hContact, "Ignore", "Mask1", 0) & 1)) // 9 - online notification return; if (Disabled) -- cgit v1.2.3