summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-09-24 11:11:49 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-09-24 11:11:49 (GMT)
commit3a57283476de7d29d6652145336dc03964d5659c (patch)
tree3594c8fefb176f6ae6380cd8ffd7850a22807248 /Swift/Controllers/Chat
parenta29b7059d8d2a43a9ec6095d53ad61fa9886e20b (diff)
downloadswift-3a57283476de7d29d6652145336dc03964d5659c.zip
swift-3a57283476de7d29d6652145336dc03964d5659c.tar.bz2
Don't overwrite date changes with presence changes
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r--Swift/Controllers/Chat/ChatController.h1
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp1
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.h1
-rw-r--r--Swift/Controllers/Chat/MUCController.h1
4 files changed, 4 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatController.h b/Swift/Controllers/Chat/ChatController.h
index d44e0bf..6cb1443 100644
--- a/Swift/Controllers/Chat/ChatController.h
+++ b/Swift/Controllers/Chat/ChatController.h
@@ -32,6 +32,7 @@ namespace Swift {
String senderDisplayNameFromMessage(const JID& from);
virtual boost::optional<boost::posix_time::ptime> getMessageTimestamp(boost::shared_ptr<Message>) const;
void handleStanzaAcked(boost::shared_ptr<Stanza> stanza);
+ void dayTicked() {lastWasPresence_ = false;}
private:
NickResolver* nickResolver_;
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index 177cdf0..9619722 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -50,6 +50,7 @@ void ChatControllerBase::handleDayChangeTick() {
dateChangeTimer_->stop();
boost::posix_time::ptime now = boost::posix_time::second_clock::local_time();
chatWindow_->addSystemMessage("The day is now " + String(boost::posix_time::to_iso_extended_string(now)).getSubstring(0,10));
+ dayTicked();
createDayChangeTimer();
}
diff --git a/Swift/Controllers/Chat/ChatControllerBase.h b/Swift/Controllers/Chat/ChatControllerBase.h
index fdc4381..fba173d 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.h
+++ b/Swift/Controllers/Chat/ChatControllerBase.h
@@ -59,6 +59,7 @@ namespace Swift {
virtual void preSendMessageRequest(boost::shared_ptr<Message>) {};
virtual bool isFromContact(const JID& from);
virtual boost::optional<boost::posix_time::ptime> getMessageTimestamp(boost::shared_ptr<Message>) const = 0;
+ virtual void dayTicked() {};
private:
void createDayChangeTimer();
diff --git a/Swift/Controllers/Chat/MUCController.h b/Swift/Controllers/Chat/MUCController.h
index c922e83..3f226ef 100644
--- a/Swift/Controllers/Chat/MUCController.h
+++ b/Swift/Controllers/Chat/MUCController.h
@@ -75,6 +75,7 @@ namespace Swift {
bool messageTargetsMe(boost::shared_ptr<Message> message);
void updateJoinParts();
bool shouldUpdateJoinParts();
+ void dayTicked() {lastWasPresence_ = false;}
private:
MUC* muc_;
UIEventStream* events_;