summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2024-04-27 21:41:39 +0500
committerElzorFox <elzorfox@ya.ru>2024-04-27 21:41:39 +0500
commit32283350effbb57e168452ed2da6092cc83e6094 (patch)
treeb3d58db3f8b2090a56ebf8165b35231a9d69e40d /protocols/VKontakte/src/misc.cpp
parente55972fa316f61a21034cc6120cc475eb30de2b5 (diff)
VKontakte: small logic fix
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 3fdf4124c7..adfc14411d 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -1134,7 +1134,6 @@ CMStringW CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC, MCO
case imgPreview300:
wszPreviewLink = vkSizes[wszPriorSize.Find(L"q")].wszUrl.IsEmpty() ? (vkSizes[wszPriorSize.Find(L"x")].wszUrl.IsEmpty() ? vkSizes[wszPriorSize.Find(L"o")].wszUrl : vkSizes[wszPriorSize.Find(L"x")].wszUrl) : vkSizes[wszPriorSize.Find(L"q")].wszUrl;
iPreviewHeight = vkSizes[wszPriorSize.Find(L"q")].wszUrl.IsEmpty() ? (vkSizes[wszPriorSize.Find(L"x")].wszUrl.IsEmpty() ? vkSizes[wszPriorSize.Find(L"o")].iSizeH : vkSizes[wszPriorSize.Find(L"x")].iSizeH) : vkSizes[wszPriorSize.Find(L"q")].iSizeH;
- iPreviewHeight = min(320, iPreviewHeight);
break;
case imgFullSize:
wszPreviewLink = vkSizes[iMaxSize].wszUrl;
@@ -1157,11 +1156,12 @@ CMStringW CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC, MCO
);
- if (m_vkOptions.bBBCNewStorySupport)
+ if (m_vkOptions.bBBCNewStorySupport) {
wszPreviewLink = GetVkFileItem(wszPreviewLink, hContact, iMessageId);
+ iPreviewHeight = min(320, iPreviewHeight);
+ }
CMStringW wszImg;
-
CMStringW wszPreviewHeight(FORMAT, L" height=%d", iPreviewHeight);
if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo)