diff options
Diffstat (limited to 'Swift/Controllers')
-rw-r--r-- | Swift/Controllers/HistoryViewController.cpp | 3 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/HistoryWindow.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/HistoryViewController.cpp b/Swift/Controllers/HistoryViewController.cpp index e5e2acc..c6e663b 100644 --- a/Swift/Controllers/HistoryViewController.cpp +++ b/Swift/Controllers/HistoryViewController.cpp @@ -158,9 +158,10 @@ void HistoryViewController::handleReturnPressed(const std::string& keyword) { void HistoryViewController::handleScrollReachedTop(const boost::gregorian::date& date) { std::vector<HistoryMessage> messages = historyController_->getMessagesFromPreviousDate(selfJID_, selectedItem_->getJID(), selectedItemType_, date); - reverse_foreach (const HistoryMessage& message, messages) { + foreach (const HistoryMessage& message, messages) { addNewMessage(message, true); } + historyWindow_->resetConversationViewTopInsertPoint(); } void HistoryViewController::handleScrollReachedBottom(const boost::gregorian::date& date) { diff --git a/Swift/Controllers/UIInterfaces/HistoryWindow.h b/Swift/Controllers/UIInterfaces/HistoryWindow.h index aa1a495..edc4af3 100644 --- a/Swift/Controllers/UIInterfaces/HistoryWindow.h +++ b/Swift/Controllers/UIInterfaces/HistoryWindow.h @@ -17,6 +17,7 @@ namespace Swift { virtual void setRosterModel(Roster*) = 0; virtual void addMessage(const std::string &message, const std::string &senderName, bool senderIsSelf, const std::string& avatarPath, const boost::posix_time::ptime& time, bool addAtTheTop) = 0; virtual void resetConversationView() = 0; + virtual void resetConversationViewTopInsertPoint() = 0; // this is a temporary fix used in adding messages at the top virtual void setDate(const boost::gregorian::date& date) = 0; boost::signal<void (RosterItem*)> onSelectedContactChanged; |