summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_history.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_history.cpp
parenta8007991b6f8f5381dd290b44fdcf346f68f48b3 (diff)
VKontakte: more fix multiply loading history
Diffstat (limited to 'protocols/VKontakte/src/vk_history.cpp')
-rw-r--r--protocols/VKontakte/src/vk_history.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp
index 503a370593..2383922618 100644
--- a/protocols/VKontakte/src/vk_history.cpp
+++ b/protocols/VKontakte/src/vk_history.cpp
@@ -24,6 +24,10 @@ INT_PTR __cdecl CVkProto::SvcGetAllServerHistoryForContact(WPARAM hContact, LPAR
debugLogA("CVkProto::SvcGetAllServerHistoryForContact");
if (!IsOnline())
return 0;
+
+ if (getBool(hContact, "ActiveHistoryTask"))
+ return 0;
+
LPCWSTR str = TranslateT("Are you sure to reload all messages from vk.com?\nLocal contact history will be deleted and reloaded from the server.\nIt may take a long time.\nDo you want to continue?");
if (IDNO == MessageBoxW(NULL, str, TranslateT("Attention!"), MB_ICONWARNING | MB_YESNO))
return 0;
@@ -32,6 +36,8 @@ INT_PTR __cdecl CVkProto::SvcGetAllServerHistoryForContact(WPARAM hContact, LPAR
if (userID == VK_INVALID_USER || userID == VK_FEED_USER)
return 0;
+ setByte(hContact, "ActiveHistoryTask", 1);
+
MEVENT hDBEvent = db_event_first(hContact);
while (hDBEvent) {
MEVENT hDBEventNext = db_event_next(hContact, hDBEvent);