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 --- protocols/Gadu-Gadu/src/core.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/Gadu-Gadu/src') diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index d6a16a9493..3a2644f0b6 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1317,8 +1317,9 @@ int GaduProto::dbsettingchanged(WPARAM hContact, LPARAM lParam) // If not on list changed if (!strcmp(cws->szSetting, "NotOnList")) { - if (db_get_b(hContact, "CList", "Hidden", 0)) + if (Clist_IsHidden(hContact)) return 0; + // Notify user normally this time if added to the list permanently if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) notifyuser(hContact, 1); @@ -1460,7 +1461,7 @@ MCONTACT GaduProto::getcontact(uin_t uin, int create, int inlist, wchar_t *szNic if ((uin_t)getDword(hContact, GG_KEY_UIN, 0) == uin && !isChatRoom(hContact)) { if (inlist) { db_unset(hContact, "CList", "NotOnList"); - db_unset(hContact, "CList", "Hidden"); + Clist_HideContact(hContact, false); } return hContact; } -- cgit v1.2.3