summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_messages.cpp
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-04-02 00:25:31 +0500
committerElzorFox <elzorfox@ya.ru>2017-04-02 00:25:31 +0500
commit734e5c519a9850d180fd7c441c4cda1c053e8bfc (patch)
treee5b74418ee6f7879ec7f377e6e4485298cf01511 /protocols/VKontakte/src/vk_messages.cpp
parenta8007991b6f8f5381dd290b44fdcf346f68f48b3 (diff)
VKontakte: more fix multiply loading history
Diffstat (limited to 'protocols/VKontakte/src/vk_messages.cpp')
-rw-r--r--protocols/VKontakte/src/vk_messages.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp
index beb0e019e7..a54d8451aa 100644
--- a/protocols/VKontakte/src/vk_messages.cpp
+++ b/protocols/VKontakte/src/vk_messages.cpp
@@ -430,16 +430,20 @@ void CVkProto::OnReceiveDlgs(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
int mid = jnDlg["id"].as_int();
m_bNotifyForEndLoadingHistory = false;
- if (getDword(hContact, "lastmsgid", -1) == -1 && numUnread)
+ if (getDword(hContact, "lastmsgid", -1) == -1 && numUnread && !getBool(hContact, "ActiveHistoryTask")) {
+ setByte(hContact, "ActiveHistoryTask", 1);
GetServerHistory(hContact, 0, numUnread, 0, 0, true);
+ }
else
GetHistoryDlg(hContact, mid);
if (m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnReceive && numUnread)
MarkMessagesRead(hContact);
}
- else if (numUnread) {
+ else if (numUnread && !getBool(hContact, "ActiveHistoryTask")) {
+
m_bNotifyForEndLoadingHistory = false;
+ setByte(hContact, "ActiveHistoryTask", 1);
GetServerHistory(hContact, 0, numUnread, 0, 0, true);
if (m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnReceive)