summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/cache.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-08-01 12:43:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-08-01 12:43:17 +0300
commitd057fcad5175ef542723981f59c6184a67942864 (patch)
tree3d258bf16b7c1622928a261942ce2e25a1430a69 /plugins/AVS/src/cache.cpp
parent9db4ad0747d45ffe0e8ed82c864c1b22537ff842 (diff)
fixes #2022 (shitty internal AVS flags finally removed from global include file)
Diffstat (limited to 'plugins/AVS/src/cache.cpp')
-rw-r--r--plugins/AVS/src/cache.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp
index d698f42b93..6c965f8cc4 100644
--- a/plugins/AVS/src/cache.cpp
+++ b/plugins/AVS/src/cache.cpp
@@ -81,7 +81,7 @@ CacheNode* FindAvatarInCache(MCONTACT hContact, bool add, bool findAny)
cc = arCache.find((CacheNode*)&hContact);
if (cc) {
cc->t_lastAccess = time(0);
- return (cc->loaded || findAny) ? cc : nullptr;
+ return (cc->bLoaded || findAny) ? cc : nullptr;
}
// not found
@@ -101,11 +101,11 @@ CacheNode* FindAvatarInCache(MCONTACT hContact, bool add, bool findAny)
case 1: // loaded, everything is ok
if (cc->hbmPic != nullptr)
- cc->loaded = true;
+ cc->bLoaded = true;
break;
default:
- cc->loaded = false;
+ cc->bLoaded = false;
break;
}
@@ -133,9 +133,10 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node, AVATARCACHEENTRY *ace)
if (hMasterContact && db_mc_getMostOnline(hMasterContact) == hContact && !db_get_b(hMasterContact, "ContactPhoto", "Locked", 0))
NotifyEventHooks(hEventChanged, (WPARAM)hMasterContact, (LPARAM)ace);
- if (node->dwFlags & AVH_MUSTNOTIFY) {
+ if (node->bNotify) {
// Fire the event for avatar history
- node->dwFlags &= ~AVH_MUSTNOTIFY;
+ node->bNotify = false;
+
if (node->szFilename[0] != '\0') {
CONTACTAVATARCHANGEDNOTIFICATION cacn = {};
cacn.hContact = hContact;
@@ -262,7 +263,7 @@ void PicLoader(LPVOID)
{
mir_cslock l(cachecs);
memcpy(node, &ace_temp, sizeof(AVATARCACHEENTRY));
- node->loaded = TRUE;
+ node->bLoaded = true;
}
if (oldPic)
DeleteObject(oldPic);
@@ -273,7 +274,7 @@ void PicLoader(LPVOID)
{
mir_cslock l(cachecs);
memcpy(node, &ace_temp, sizeof(AVATARCACHEENTRY));
- node->loaded = FALSE;
+ node->bLoaded = false;
}
if (oldPic)
DeleteObject(oldPic);