diff options
author | ElzorFox <elzorfox@ya.ru> | 2017-01-11 10:21:19 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2017-01-11 10:21:19 +0500 |
commit | 16fe45e4297e335f76719fcade05999a45a85349 (patch) | |
tree | a4d3dee68fad7a9a963066fe6d8efa4b345e4233 /protocols/VKontakte/src/vk_thread.cpp | |
parent | 64a226c992df61beef30c5e1b86bf34b478fe3e5 (diff) |
VKontakte: remove unneeded code
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 8e1c6b2b6a..e47ca75430 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -347,8 +347,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) }
int iNewStatus = (jnItem["online"].as_int() == 0) ? ID_STATUS_OFFLINE : ID_STATUS_ONLINE;
- if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != iNewStatus)
- setWord(hContact, "Status", iNewStatus);
+ setWord(hContact, "Status", iNewStatus);
if (iNewStatus == ID_STATUS_ONLINE) {
db_set_dw(hContact, "BuddyExpectator", "LastSeen", (DWORD)time(NULL));
@@ -379,9 +378,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) setWString(hContact, "Phone", wszValue);
wszValue = jnItem["status"].as_mstring();
- CMStringW wszOldStatus(ptrW(db_get_wsa(hContact, hContact ? "CList" : m_szModuleName, "StatusMsg")));
- if (wszValue != wszOldStatus)
- db_set_ws(hContact, hContact ? "CList" : m_szModuleName, "StatusMsg", wszValue);
+ db_set_ws(hContact, hContact ? "CList" : m_szModuleName, "StatusMsg", wszValue);
CMStringW wszOldListeningTo(ptrW(db_get_wsa(hContact, m_szModuleName, "ListeningTo")));
const JSONNode &jnAudio = jnItem["status_audio"];
@@ -675,8 +672,7 @@ void CVkProto::OnReceiveGroupInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR if (!wszValue.IsEmpty())
setWString(hContact, "Nick", wszValue);
- if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_ONLINE)
- setWord(hContact, "Status", ID_STATUS_ONLINE);
+ setWord(hContact, "Status", ID_STATUS_ONLINE);
setByte(hContact, "Auth", !bIsMember);
setByte(hContact, "friend", bIsMember);
@@ -700,9 +696,7 @@ void CVkProto::OnReceiveGroupInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR }
wszValue = jnItem["status"].as_mstring();
- CMStringW wszOldStatus(ptrW(db_get_wsa(hContact, "CList", "StatusMsg")));
- if (wszValue != wszOldStatus)
- db_set_ws(hContact, "CList", "StatusMsg", wszValue);
+ db_set_ws(hContact, "CList", "StatusMsg", wszValue);
CMStringW wszOldListeningTo(ptrW(db_get_wsa(hContact, m_szModuleName, "ListeningTo")));
const JSONNode &jnAudio = jnItem["status_audio"];
|