summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/communication.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-04-05 09:03:20 +0000
committerRobert Pösel <robyer@seznam.cz>2014-04-05 09:03:20 +0000
commit5e8e5ed54e602e0de3d328098ff828cba441b2a0 (patch)
tree178212b37c358cb3f6d5b1c1f2ca195b49aa24d5 /protocols/FacebookRM/src/communication.cpp
parent7e7e977e3dd74fe09c62d7b345bbbbecf33602a4 (diff)
Facebook: Correct implementation of managing number of unread notifications
git-svn-id: http://svn.miranda-ng.org/main/trunk@8858 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r--protocols/FacebookRM/src/communication.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index e1facb8016..901d731074 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -679,6 +679,19 @@ void facebook_client::clear_cookies()
cookies.clear();
}
+void facebook_client::clear_notifications()
+{
+ for (std::map<std::string, facebook_notification*>::iterator it = notifications.begin(); it != notifications.end(); ) {
+ if (it->second->hWndPopup != NULL)
+ PUDeletePopup(it->second->hWndPopup); // close popup
+
+ delete it->second;
+ it = notifications.erase(it);
+ }
+
+ notifications.clear();
+}
+
void loginError(FacebookProto *proto, std::string error_str) {
error_str = utils::text::trim(
utils::text::special_expressions_decode(