diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-02-05 14:10:17 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-02-05 14:10:17 +0000 |
commit | 76f5c3ac676d82dbb5b36fc9ebf67aa9d0e73ea1 (patch) | |
tree | c9c8c64ade8918198ca78d54d376a595f532c243 | |
parent | 3e1994c949e104087a865e82a5cacc036781f755 (diff) |
VKontakte: hidden option ‘MaxFriendsCount’ support
git-svn-id: http://svn.miranda-ng.org/main/trunk@16222 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 3 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 47dbcfa572..e01fb54ba4 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -136,6 +136,8 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : if (m_ReturnChatMessage == NULL)
m_ReturnChatMessage = mir_tstrdup(TranslateT("I'm back"));
+ m_iMaxFriendsCount = getDword("MaxFriendsCount", 1000);
+
// Set all contacts offline -- in case we crashed
SetAllContactStatuses(ID_STATUS_OFFLINE);
{
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 0f8c17e1a2..e536536245 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -407,7 +407,8 @@ private: m_iNotificationsInterval,
m_iNewsAutoClearHistoryInterval,
m_iMaxLoadNewsPhoto,
- m_iInvisibleInterval;
+ m_iInvisibleInterval,
+ m_iMaxFriendsCount;
enum MarkMsgReadOn { markOnRead, markOnReceive, markOnReply, markOnTyping };
MarkMsgReadOn m_iMarkMessageReadOn;
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 1be9dae334..4775fe83fb 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -506,7 +506,7 @@ void CVkProto::RetrieveFriends(bool bCleanNonFriendContacts) if (!IsOnline())
return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/friends.get.json", true, &CVkProto::OnReceiveFriends)
- << INT_PARAM("count", 1000)
+ << INT_PARAM("count", m_iMaxFriendsCount > 5000 ? 1000 : m_iMaxFriendsCount)
<< CHAR_PARAM("fields", fieldsName)
<< VER_API)->pUserInfo = new CVkSendMsgParam(NULL, bCleanNonFriendContacts ? 1 : 0);
}
|