From 02c0d283de8781f2826a7bc985ff005ed553d114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 27 Apr 2015 22:05:15 +0000 Subject: Facebook: Use delays when downloading avatars and don't call CheckAvatarChange when adding contacts This will hopefully help bigger friend lists and won't slow down login process so much. git-svn-id: http://svn.miranda-ng.org/main/trunk@13211 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/avatars.cpp | 8 ++++++-- protocols/FacebookRM/src/contacts.cpp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'protocols/FacebookRM') diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index cd68b55c62..3f9dfa0994 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -155,11 +155,15 @@ INT_PTR FacebookProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) break; case AF_DELAYAFTERFAIL: - res = 60 * 1000; + res = 10 * 60 * 1000; break; - case AF_ENABLED: case AF_DONTNEEDDELAYS: + // We need delays because of larger friend lists + res = 0; + break; + + case AF_ENABLED: case AF_FETCHIFPROTONOTVISIBLE: case AF_FETCHIFCONTACTOFFLINE: res = 1; diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index 9ea1e60abf..b0bd083ad6 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -390,7 +390,7 @@ MCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, b if (fbu->gender) setByte(hContact, "Gender", fbu->gender); - CheckAvatarChange(hContact, fbu->image_url); + // CheckAvatarChange(hContact, fbu->image_url); } return hContact; -- cgit v1.2.3