summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-04-26 14:55:42 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-26 14:55:42 (GMT)
commit2305f69ba32813e4e7aa255c3c310a88493a0c12 (patch)
tree2f8f4c8a28cb99b39ed435324ef946e767c337bc
parentdb3fd8757e63d85d8f78bcb00586dc0d2e9aa0f8 (diff)
downloadswift-2305f69ba32813e4e7aa255c3c310a88493a0c12.zip
swift-2305f69ba32813e4e7aa255c3c310a88493a0c12.tar.bz2
Avoid adding messages to the Notices view for the currently selected tab.
Resolves: #934
-rw-r--r--Swift/Controllers/EventWindowController.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp
index 32b9c76..a6ba3c1 100644
--- a/Swift/Controllers/EventWindowController.cpp
+++ b/Swift/Controllers/EventWindowController.cpp
@@ -6,6 +6,7 @@
#include <Swift/Controllers/EventWindowController.h>
+#include <Swift/Controllers/XMPPEvents/MessageEvent.h>
#include <Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h>
#include <boost/bind.hpp>
@@ -40,7 +41,7 @@ void EventWindowController::handleEventConcluded(boost::shared_ptr<StanzaEvent>
window_->removeEvent(event);
bool includeAsCompleted = true;
/* Because subscription requests get duplicated, don't add them back */
- if (boost::dynamic_pointer_cast<SubscriptionRequestEvent>(event)) {
+ if (boost::dynamic_pointer_cast<SubscriptionRequestEvent>(event) || boost::dynamic_pointer_cast<MessageEvent>(event)) {
includeAsCompleted = false;
}
if (includeAsCompleted) {