From 80562f021ec5144326fb940422bfbd974bb74732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 23 Apr 2014 09:43:44 +0000 Subject: Facebook: Fixed loading own name and saving names improvements + hidden setting "NameAsNick" to not save real name as nickname (but it's pretty useless/ugly now) git-svn-id: http://svn.miranda-ng.org/main/trunk@9054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/process.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'protocols/FacebookRM/src/process.cpp') diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 171341701c..fbbbb0c657 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -175,23 +175,16 @@ void FacebookProto::ProcessFriendList(void* data) // Update gender if (getByte(hContact, "Gender", 0) != fbu->gender) setByte(hContact, "Gender", fbu->gender); - - // Update name - DBVARIANT dbv; - bool update_required = true; - - // TODO: remove in some future version? + + // TODO: remove this in some future version? + // Remove old useless "RealName" field ptrA realname(getStringA(hContact, "RealName")); if (realname != NULL) { delSetting(hContact, "RealName"); } - else if (!getStringUtf(hContact, FACEBOOK_KEY_NICK, &dbv)) - { - update_required = strcmp(dbv.pszVal, fbu->real_name.c_str()) != 0; - db_free(&dbv); - } - if (update_required) - { + + // Update real name and nick + if (!fbu->real_name.empty()) { SaveName(hContact, fbu); } -- cgit v1.2.3