summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp2
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp4
-rw-r--r--Swift/Controllers/UIInterfaces/ChatWindow.h3
-rw-r--r--Swift/Controllers/UnitTest/MockChatWindow.h2
4 files changed, 6 insertions, 5 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp
index 65d65a6..2367761 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -480,3 +480,3 @@ void ChatController::handlePresenceChange(boost::shared_ptr<Presence> newPresenc
if (lastWasPresence_) {
- chatWindow_->replaceLastMessage(chatMessageParser_->parseMessageBody(newStatusChangeString));
+ chatWindow_->replaceLastMessage(chatMessageParser_->parseMessageBody(newStatusChangeString), ChatWindow::UpdateTimestamp);
} else {
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 6bc7067..d09bc3d 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -346,3 +346,3 @@ void MUCController::handleJoinComplete(const std::string& nick) {
setNick(nick);
- chatWindow_->replaceLastMessage(chatMessageParser_->parseMessageBody(joinMessage));
+ chatWindow_->replaceLastMessage(chatMessageParser_->parseMessageBody(joinMessage), ChatWindow::UpdateTimestamp);
@@ -716,3 +716,3 @@ boost::optional<boost::posix_time::ptime> MUCController::getMessageTimestamp(boo
void MUCController::updateJoinParts() {
- chatWindow_->replaceLastMessage(chatMessageParser_->parseMessageBody(generateJoinPartString(joinParts_, isImpromptu())));
+ chatWindow_->replaceLastMessage(chatMessageParser_->parseMessageBody(generateJoinPartString(joinParts_, isImpromptu())), ChatWindow::UpdateTimestamp);
}
diff --git a/Swift/Controllers/UIInterfaces/ChatWindow.h b/Swift/Controllers/UIInterfaces/ChatWindow.h
index ba4b397..bf4744b 100644
--- a/Swift/Controllers/UIInterfaces/ChatWindow.h
+++ b/Swift/Controllers/UIInterfaces/ChatWindow.h
@@ -96,2 +96,3 @@ namespace Swift {
enum MUCType { StandardMUC, ImpromptuMUC };
+ enum TimestampBehaviour { KeepTimestamp, UpdateTimestamp };
@@ -144,3 +145,3 @@ namespace Swift {
virtual void setTabComplete(TabComplete* completer) = 0;
- virtual void replaceLastMessage(const ChatMessage& message) = 0;
+ virtual void replaceLastMessage(const ChatMessage& message, const TimestampBehaviour timestampBehaviour) = 0;
virtual void setAckState(const std::string& id, AckState state) = 0;
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h
index e4c2548..823ea3a 100644
--- a/Swift/Controllers/UnitTest/MockChatWindow.h
+++ b/Swift/Controllers/UnitTest/MockChatWindow.h
@@ -31,3 +31,3 @@ namespace Swift {
virtual void replaceWithAction(const ChatMessage& /*message*/, const std::string& /*id*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {}
- virtual void replaceLastMessage(const ChatMessage& /*message*/) {}
+ virtual void replaceLastMessage(const ChatMessage& /*message*/, const TimestampBehaviour /*timestampBehaviour*/) {}