diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-26 22:15:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-26 22:15:57 +0300 |
commit | 15c49e3fc4cf033fffbf79e9f68a0405d5a95d14 (patch) | |
tree | 3ba342e3e8645156102d3c5f3f9a1b5dafe4c22c /protocols/Gadu-Gadu/src | |
parent | d095047014348c9e8dd72a72dc59b2abd22bbf9c (diff) |
Clist_IsHidden / Clist_HideContact - two helpers to hide CList/Hidden variable and unify access to it
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r-- | protocols/Gadu-Gadu/src/core.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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;
}
|