From cd21e4aba3f26b8c6bde360c6ebb12cbc1ee5ed2 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Fri, 20 Aug 2010 11:44:28 +0100
Subject: Fix chats sometimes not re-opening on new messages.

Resolves: #533

diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index b86a993..e38d12d 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -122,7 +122,7 @@ void ChatControllerBase::handleIncomingMessage(boost::shared_ptr<MessageEvent> m
 	if (messageEvent->isReadable()) {
 		unreadMessages_.push_back(messageEvent);
 	}
-	chatWindow_->setUnreadMessageCount(unreadMessages_.size());
+
 
 
 	preHandleIncomingMessage(messageEvent);	
@@ -160,6 +160,8 @@ void ChatControllerBase::handleIncomingMessage(boost::shared_ptr<MessageEvent> m
 
 		addMessage(body, senderDisplayNameFromMessage(from), isIncomingMessageFromMe(message), maybeLabel, String(avatarManager_->getAvatarPath(from).string()), timeStamp);
 	}
+	chatWindow_->show();
+	chatWindow_->setUnreadMessageCount(unreadMessages_.size());
 }
 
 String ChatControllerBase::getErrorMessage(boost::shared_ptr<ErrorPayload> error) {
-- 
cgit v0.10.2-6-g49f6