summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-07-28 18:50:56 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-07-28 18:52:54 (GMT)
commit93d2190468d8dd42d18e1c1d0a30abffac76de22 (patch)
tree44c472fde7b407455f836261281ada4dd2e2bc44
parent719127a8772f921fdba3169b449a4407143c8c45 (diff)
downloadswift-contrib-93d2190468d8dd42d18e1c1d0a30abffac76de22.zip
swift-contrib-93d2190468d8dd42d18e1c1d0a30abffac76de22.tar.bz2
Fix for previous commit losing style for some MUC messages.
Resolves: #516
-rw-r--r--Swift/QtUI/QtChatWindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index a0b25a9..f39353c 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -261,7 +261,7 @@ void QtChatWindow::addMessage(const String &message, const String &senderName, b
QString styleSpanEnd = style == "" ? "" : "</span>";
htmlString += styleSpanStart + messageHTML + styleSpanEnd;
- bool appendToPrevious = !previousMessageWasSystem_ && ((senderIsSelf && previousMessageWasSelf_) || (!senderIsSelf && !previousMessageWasSelf_ && previousSenderName_ == P2QSTRING(senderName)));
+ bool appendToPrevious = !previousMessageWasSystem_ && !previousMessageWasPresence_ && ((senderIsSelf && previousMessageWasSelf_) || (!senderIsSelf && !previousMessageWasSelf_ && previousSenderName_ == P2QSTRING(senderName)));
QString qAvatarPath = avatarPath.isEmpty() ? "qrc:/icons/avatar.png" : QUrl::fromLocalFile(P2QSTRING(avatarPath)).toEncoded();
messageLog_->addMessage(MessageSnippet(htmlString, Qt::escape(P2QSTRING(senderName)), B2QDATE(time), qAvatarPath, senderIsSelf, appendToPrevious));
@@ -314,7 +314,7 @@ void QtChatWindow::addPresenceMessage(const String& message) {
QString messageHTML(Qt::escape(P2QSTRING(message)));
messageHTML.replace("\n","<br/>");
- messageLog_->addMessage(SystemMessageSnippet(messageHTML, QDateTime::currentDateTime(),previousMessageWasPresence_));
+ messageLog_->addMessage(SystemMessageSnippet(messageHTML, QDateTime::currentDateTime(), previousMessageWasPresence_));
previousMessageWasSelf_ = false;
previousMessageWasSystem_ = false;