MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / ProcessBizAvatarVersion

Method ProcessBizAvatarVersion

src/database/WizDatabase.cpp:2322–2348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2320 }
2321 //
2322 static void ProcessBizAvatarVersion(QString strBizGUID, WizDatabase& db, const std::map<QString, QString>& mapAvatars)
2323 {
2324 if (mapAvatars.empty())
2325 return;
2326 //
2327 __int64 oldVer = GetProcessedAvatarVersion(strBizGUID, db);
2328 __int64 newVer = oldVer;
2329 //
2330 for (std::map<QString, QString>::const_iterator it = mapAvatars.begin();
2331 it != mapAvatars.end();
2332 it++)
2333 {
2334 __int64 v = wiz_ttoi64(it->first);
2335 if (v > oldVer)
2336 {
2337 newVer = std::max<__int64>(v, newVer);
2338 //
2339 TOLOG1("[sync] User avatar changed : %1", it->second);
2340 WizAvatarHost::reload(it->second);
2341 }
2342 }
2343 //
2344 if (newVer > oldVer)
2345 {
2346 SetProcessedAvatarVersion(strBizGUID, db, newVer);
2347 }
2348 }
2349 };
2350
2351

Callers

nothing calls this directly

Calls 4

wiz_ttoi64Function · 0.85
beginMethod · 0.80
endMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected