summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/process.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-04-02 22:53:15 +0000
committerRobert Pösel <robyer@seznam.cz>2014-04-02 22:53:15 +0000
commit3ff89e16119e063eb5719679e7b34d306116b265 (patch)
tree561932232ef2520287a3835509629f5a8a53c8a8 /protocols/FacebookRM/src/process.cpp
parentfe7d9276ebedd60308159925eb3f37d9a3b113a0 (diff)
Facebook: Add support for showing unread notifications count as "unread emails" in clist
git-svn-id: http://svn.miranda-ng.org/main/trunk@8831 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r--protocols/FacebookRM/src/process.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index c06143bc69..0fd44897ce 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -552,9 +552,6 @@ void FacebookProto::ProcessNotifications(void*)
if (isOffline())
return;
- if (!getByte(FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE))
- return;
-
facy.handle_entry("notifications");
// Get notifications
@@ -577,6 +574,11 @@ void FacebookProto::ProcessNotifications(void*)
p->parse_notifications(&(resp.data), &notifications);
delete p;
+ facy.notifications_count_ = notifications.size();
+
+ if (!getByte(FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE))
+ return;
+
for(std::vector<facebook_notification*>::size_type i=0; i<notifications.size(); i++)
{
debugLogA(" Got notification: %s", notifications[i]->text.c_str());