summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/messages.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-09-06 03:53:05 +0000
committerRobert Pösel <robyer@seznam.cz>2016-09-06 03:53:05 +0000
commit910d3cab907dc5649a01bab756dc78af74a23981 (patch)
treefc0254ce435d41e553c0c1b815edc6a00067f465 /protocols/FacebookRM/src/messages.cpp
parenta41b7bafb1181d2953c977b3c3f9ee3d746e5cd7 (diff)
Facebook: Improve loading history
* Allow loading history only for one contact at a time * Make text in messagebox translatable and use question instead of warning type * Don't load and refresh stickers during history loading (so it won't be slow) git-svn-id: http://svn.miranda-ng.org/main/trunk@17264 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r--protocols/FacebookRM/src/messages.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 425f926912..7ef0488313 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -193,6 +193,10 @@ void FacebookProto::ReadMessageWorker(void *p)
void FacebookProto::StickerAsSmiley(std::string sticker, const std::string &url, MCONTACT hContact)
{
+ // Don't load stickers as smileys when we're loading history
+ if (facy.loading_history)
+ return;
+
std::string b64 = ptrA(mir_base64_encode((PBYTE)sticker.c_str(), (unsigned)sticker.length()));
b64 = utils::url::encode(b64);
@@ -202,7 +206,7 @@ void FacebookProto::StickerAsSmiley(std::string sticker, const std::string &url,
filename += (wchar_t*)_A2T(b64.c_str());
filename += L".png";
- // Check if we have this sticker already and download it it not
+ // Check if we have this sticker already and download it if not
if (GetFileAttributes(filename.c_str()) == INVALID_FILE_ATTRIBUTES) {
HANDLE nlc = NULL;
facy.save_url(url, filename, nlc);