summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/EventWindowController.cpp')
-rw-r--r--Swift/Controllers/EventWindowController.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp
index a6ff061..fbe9a8a 100644
--- a/Swift/Controllers/EventWindowController.cpp
+++ b/Swift/Controllers/EventWindowController.cpp
@@ -24,8 +24,12 @@ EventWindowController::~EventWindowController() {
}
void EventWindowController::handleEventQueueEventAdded(boost::shared_ptr<StanzaEvent> event) {
- event->onConclusion.connect(boost::bind(&EventWindowController::handleEventConcluded, this, event));
- window_->addEvent(event, event->getConcluded());
+ if (event->getConcluded()) {
+ handleEventConcluded(event);
+ } else {
+ event->onConclusion.connect(boost::bind(&EventWindowController::handleEventConcluded, this, event));
+ window_->addEvent(event, true);
+ }
}
void EventWindowController::handleEventConcluded(boost::shared_ptr<StanzaEvent> event) {