diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-23 08:02:18 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-23 08:02:18 +0000 |
commit | 08e2cef3aec75f8f913e6e1bab6b2a9b622ed640 (patch) | |
tree | 63be0a6159b1fb87b3ef2b30fa9c36a0173bf27e /protocols/VKontakte/src/vk_thread.cpp | |
parent | e214ccaf1647ba22768a5eeb08db038f957bb94a (diff) |
VKontakte: fix for loading contact avatars
git-svn-id: http://svn.miranda-ng.org/main/trunk@10562 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 3259b53eca..0c059872d3 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -323,7 +323,10 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe }
szValue = json_as_string( json_get(pRecord, "photo_100"));
- SetAvatarUrl(hContact, szValue);
+ if (szValue && *szValue){
+ SetAvatarUrl(hContact, szValue);
+ ReloadAvatarInfo(hContact);
+ }
int iNewStatus = (json_as_int(json_get(pRecord, "online")) == 0) ? ID_STATUS_OFFLINE : ID_STATUS_ONLINE;
if (getWord(hContact, "Status", 0) != iNewStatus)
@@ -419,7 +422,10 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq setTString(hContact, "Nick", tszNick);
szValue = json_as_string(json_get(pInfo, "photo_100"));
- SetAvatarUrl(hContact, szValue);
+ if (szValue && *szValue){
+ SetAvatarUrl(hContact, szValue);
+ ReloadAvatarInfo(hContact);
+ }
int iNewStatus = (json_as_int(json_get(pInfo, "online")) == 0) ? ID_STATUS_OFFLINE : ID_STATUS_ONLINE;
if (getWord(hContact, "Status", 0) != iNewStatus)
|