diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-07-06 09:00:21 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-07-06 09:00:21 +0000 |
commit | 1e11f5fc920b54759b2ec16854d8f9e65662cdec (patch) | |
tree | 51dd2419a0278a57d1d0dfab6697624c8dc2ced8 /protocols/FacebookRM/src/connection.cpp | |
parent | ea1f790f193039c1091d6c091825fe924a30fcb0 (diff) |
Facebook: Fix invisible status (now it's not true-invisible again)
It's not fully tested, should be fixed better later.
git-svn-id: http://svn.miranda-ng.org/main/trunk@9702 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/connection.cpp')
-rw-r--r-- | protocols/FacebookRM/src/connection.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp index 02699bc1e0..7ecc553f20 100644 --- a/protocols/FacebookRM/src/connection.cpp +++ b/protocols/FacebookRM/src/connection.cpp @@ -125,11 +125,18 @@ void FacebookProto::ChangeStatus(void*) debugLogA("***** SignOn complete"); } - facy.chat_state(m_iDesiredStatus != ID_STATUS_INVISIBLE); + m_invisible = (new_status == ID_STATUS_INVISIBLE); - ForkThread(&FacebookProto::ProcessBuddyList, NULL); + facy.chat_state(!m_invisible); - m_iStatus = facy.self_.status_id = m_iDesiredStatus; + if (m_invisible) { + facy.buddies.clear(); + SetAllContactStatuses(ID_STATUS_OFFLINE); + } else { + ForkThread(&FacebookProto::ProcessBuddyList, NULL); + } + + m_iStatus = facy.self_.status_id = new_status; ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus); debugLogA("***** ChangeStatus complete"); @@ -181,7 +188,8 @@ void FacebookProto::UpdateLoop(void *) for (int i = -1; !isOffline(); i = ++i % 50) { if (i != -1) { - ProcessBuddyList(NULL); + if (!isInvisible()) + ProcessBuddyList(NULL); if (getByte(FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE)) ProcessFeeds(NULL); |