summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-10-01 04:36:28 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-10-01 04:36:28 +0000
commit635a27f15ede36bd90380095402594563a225d54 (patch)
tree0dbb95a835a6a207a3eb93c3d8ae241547d1e5bd
parent5a711f8a20a86ec1519e6ea96cdd1f75b2d01d9e (diff)
VKontakte: add more application ids for MirVer
git-svn-id: http://svn.miranda-ng.org/main/trunk@10659 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/VKontakte/src/misc.cpp19
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp15
2 files changed, 20 insertions, 14 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 8a5303b3a1..0f3396b72f 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -421,38 +421,47 @@ void CVkProto::SetMirVer(MCONTACT hContact, int platform)
CMString MirVer, OldMirVer;
OldMirVer = db_get_sa(hContact, m_szModuleName, "MirVer");
- bool bSetFlag = OldMirVer.IsEmpty() || (OldMirVer == "VKontakte (other)");
+ bool bSetFlag = true;
switch (platform){
case VK_APP_ID:
MirVer = "Miranda NG VKontakte";
- bSetFlag = true;
+ break;
+ case 2386311:
+ MirVer = "QIP 2012";
break;
case 1:
MirVer = "VKontakte (mobile)";
- bSetFlag = true;
break;
+ case 3087106: // iPhone
case 2:
MirVer = "VKontakte (iphone)";
break;
+ case 3682744: // iPad
case 3:
MirVer = "VKontakte (ipad)";
break;
+ case 2890984: // Android
+ case 2274003:
case 4:
MirVer = "VKontakte (android)";
break;
+ case 3059453: // Windows Phone
+ case 2424737:
+ case 3502561:
case 5:
MirVer = "VKontakte (wphone)";
break;
+ case 3584591: // Windows 8.x
case 6:
MirVer = "VKontakte (windows)";
- break; // Official app for Windows 8.X
+ break;
case 7:
MirVer = "VKontakte (website)";
- bSetFlag = true;
break;
default:
MirVer = "VKontakte (other)";
+ bSetFlag = OldMirVer.IsEmpty();
}
if (OldMirVer == MirVer)
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index d1f2152bfe..064bd31d37 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -303,16 +303,13 @@ MCONTACT CVkProto::SetContactInfo(JSONNODE* pItem, bool flag)
if (iNewStatus == ID_STATUS_ONLINE){
int online_app = _ttoi(json_as_string(json_get(pItem, "online_app")));
int online_mobile = json_as_int(json_get(pItem, "online_mobile"));
- if (online_mobile == 1){
- if (online_app == VK_APP_ID)
- SetMirVer(hContact, VK_APP_ID); // Miranda NG
- if (online_app == 0)
- SetMirVer(hContact, 1); // m.vk.com
- else
- SetMirVer(hContact, 0); // other mobile app
- }
- else
+
+ if (online_app == 0 && online_mobile == 0)
SetMirVer(hContact, 7); // vk.com
+ else if (online_app != 0)
+ SetMirVer(hContact, online_app); // App
+ else
+ SetMirVer(hContact, 1); // m.vk.com
}
else
SetMirVer(hContact, -1); // unset MinVer