| 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 |
nothing calls this directly
no test coverage detected