From 1fb0cd07fba1e8d6f9ac2ebe3b4f2e1c60acb81b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Feb 2014 21:51:46 +0000 Subject: - 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 --- plugins/AVS/src/cache.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/AVS/src/cache.cpp') 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; } -- cgit v1.2.3