From cba2ad851f1b6cd106c2fdb9f805fcd46c9fa57d Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Tue, 25 Nov 2014 10:25:24 +0000 Subject: 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 --- protocols/VKontakte/src/vk_thread.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'protocols/VKontakte/src/vk_thread.cpp') 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); -- cgit v1.2.3