diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-25 10:25:24 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-11-25 10:25:24 +0000 |
commit | cba2ad851f1b6cd106c2fdb9f805fcd46c9fa57d (patch) | |
tree | 6dcf9e2b2b3013d694315f9d0f4a72920e040e02 /protocols/VKontakte/src/vk_thread.cpp | |
parent | 217bc5d69c56712b7e5792fb1b0a8189b259c074 (diff) |
VKontakte:
full rework for sunc and load history
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@11051 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index b96d55ea2e..ae4d84fb9f 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -686,22 +686,19 @@ void CVkProto::OnReceiveDlgs(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) int uid = json_as_int(json_get(pDlg, "user_id"));
MCONTACT hContact = FindUser(uid, true);
- if (getDword(hContact, "lastmsgid", -1) == -1 && numUnread){
- setDword(hContact, "new_lastmsgid", mid);
- GetHistoryDlgMessages(hContact, 0, numUnread, -1);
- }
+ if (getDword(hContact, "lastmsgid", -1) == -1 && numUnread)
+ GetServerHistory(hContact, 0, numUnread, 0, 0, true);
else
GetHistoryDlg(hContact, mid);
- if (m_iMarkMessageReadOn == markOnReceive&&numUnread)
+ if (m_iMarkMessageReadOn == markOnReceive && numUnread)
MarkMessagesRead(hContact);
}
else if (numUnread) {
int mid = json_as_int(json_get(pDlg, "id"));
int uid = json_as_int(json_get(pDlg, "user_id"));
MCONTACT hContact = FindUser(uid, true);
- setDword(hContact, "new_lastmsgid", mid);
- GetHistoryDlgMessages(hContact, 0, numUnread, -1);
+ GetServerHistory(hContact, 0, numUnread, 0, 0, true);
if (m_iMarkMessageReadOn == markOnReceive)
MarkMessagesRead(hContact);
|