diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-27 21:51:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-27 21:51:46 +0000 |
commit | 1fb0cd07fba1e8d6f9ac2ebe3b4f2e1c60acb81b (patch) | |
tree | 904c95b33e03e806aea734552281257768273a14 /plugins/AVS/src/cache.cpp | |
parent | a8e8aebfd4f53977873c72c2d828c2c1f505f10d (diff) |
- metacontacts are always present;
- added META_PROTO constant for mc module name;
- MS_MC_GETPROTOCOLNAME removed, because it always returns META_PROTO
git-svn-id: http://svn.miranda-ng.org/main/trunk@8319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS/src/cache.cpp')
-rw-r--r-- | plugins/AVS/src/cache.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index 37c42cb00d..93aa9abe1d 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -126,8 +126,7 @@ CacheNode *FindAvatarInCache(MCONTACT hContact, BOOL add, BOOL findAny) }
foundNode->ace.hContact = hContact;
- if (g_MetaAvail)
- foundNode->dwFlags |= (db_mc_isSub(hContact) ? MC_ISSUBCONTACT : 0);
+ foundNode->dwFlags |= (db_mc_isSub(hContact) ? MC_ISSUBCONTACT : 0);
foundNode->loaded = FALSE;
foundNode->mustLoad = 1; // pic loader will watch this and load images
SetEvent(hLoaderEvent); // wake him up
@@ -153,8 +152,8 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY NotifyEventHooks(hEventChanged, hContact, (LPARAM)ace);
- if (g_MetaAvail && (node->dwFlags & MC_ISSUBCONTACT) && db_get_b(NULL, g_szMetaName, "Enabled", 0)) {
- MCONTACT hMasterContact = (MCONTACT)db_get_dw(hContact, g_szMetaName, "Handle", 0);
+ if ((node->dwFlags & MC_ISSUBCONTACT) && db_get_b(NULL, META_PROTO, "Enabled", 0)) {
+ MCONTACT hMasterContact = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
if (hMasterContact && (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMasterContact, 0) == hContact &&
!db_get_b(hMasterContact, "ContactPhoto", "Locked", 0))
NotifyEventHooks(hEventChanged, (WPARAM)hMasterContact, (LPARAM)ace);
@@ -209,8 +208,7 @@ void DeleteAvatarFromCache(MCONTACT hContact, BOOL forever) CacheNode *node = FindAvatarInCache(hContact, FALSE);
if (node == NULL) {
struct CacheNode temp_node = {0};
- if (g_MetaAvail)
- temp_node.dwFlags |= (db_mc_isSub(hContact) ? MC_ISSUBCONTACT : 0);
+ temp_node.dwFlags |= (db_mc_isSub(hContact) ? MC_ISSUBCONTACT : 0);
NotifyMetaAware(hContact, &temp_node, (AVATARCACHEENTRY *)GetProtoDefaultAvatar(hContact));
return;
}
|