diff options
| author | Richard Maudsley <richard.maudsley@isode.com> | 2014-07-11 14:03:57 (GMT) |
|---|---|---|
| committer | Swift Review <review@swift.im> | 2014-07-27 14:09:54 (GMT) |
| commit | fde89fee2175e7cbeda9262e7517f153de76e1b8 (patch) | |
| tree | 9834c5d04a66c84fe50b1719e16c3749123fa8ff /Swift/Controllers/UnitTest/MockChatWindow.h | |
| parent | 9353d3c692e1cd37bdd15b8dbe75b92be5eaa1c0 (diff) | |
| download | swift-contrib-fde89fee2175e7cbeda9262e7517f153de76e1b8.zip swift-contrib-fde89fee2175e7cbeda9262e7517f153de76e1b8.tar.bz2 | |
Fix recent chat items not being shown for private MUC messages.
Test-Information:
Send private message and verify that the private message item in the recents list is erased when the user leaves the MUC and the chat window is closed. Check that other recent items are not removed. Check that private message recent items are not saved and loaded when the application is restarted.
Change-Id: I62b9d324143d2e77ed98592cf37fb681165285c2
Diffstat (limited to 'Swift/Controllers/UnitTest/MockChatWindow.h')
| -rw-r--r-- | Swift/Controllers/UnitTest/MockChatWindow.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h index 823ea3a..5e6606b 100644 --- a/Swift/Controllers/UnitTest/MockChatWindow.h +++ b/Swift/Controllers/UnitTest/MockChatWindow.h @@ -9,70 +9,71 @@ #include <boost/shared_ptr.hpp> #include <Swift/Controllers/UIInterfaces/ChatWindow.h> #include <Swiften/Base/foreach.h> namespace Swift { class MockChatWindow : public ChatWindow { public: MockChatWindow() : labelsEnabled_(false) {} virtual ~MockChatWindow(); virtual std::string addMessage(const ChatMessage& message, const std::string& /*senderName*/, bool /*senderIsSelf*/, boost::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) { lastMessageBody_ = bodyFromMessage(message); return "id";} virtual std::string addAction(const ChatMessage& /*message*/, const std::string& /*senderName*/, bool /*senderIsSelf*/, boost::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {return "id";} virtual void addSystemMessage(const ChatMessage& /*message*/, Direction /*direction*/) {} virtual void addPresenceMessage(const ChatMessage& /*message*/, Direction /*direction*/) {} virtual void addErrorMessage(const ChatMessage& /*message*/) {} virtual void replaceMessage(const ChatMessage& /*message*/, const std::string& /*id*/, const boost::posix_time::ptime& /*time*/, const HighlightAction& /*highlight*/) {} 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*/, const TimestampBehaviour /*timestampBehaviour*/) {} // File transfer related stuff virtual std::string addFileTransfer(const std::string& /*senderName*/, bool /*senderIsSelf*/,const std::string& /*filename*/, const boost::uintmax_t /*sizeInBytes*/) { return 0; } virtual void setFileTransferProgress(std::string /*id*/, const int /*alreadyTransferedBytes*/) { } virtual void setFileTransferStatus(std::string /*id*/, const FileTransferState /*state*/, const std::string& /*msg*/) { } virtual void setMessageReceiptState(const std::string &/* id */, ReceiptState /* state */) { } virtual void setContactChatState(ChatState::ChatStateType /*state*/) {} virtual void setName(const std::string& name) {name_ = name;} virtual void show() {} + virtual bool isVisible() const { return true; } virtual void activate() {} virtual void setAvailableSecurityLabels(const std::vector<SecurityLabelsCatalog::Item>& labels) {labels_ = labels;} virtual void setSecurityLabelsEnabled(bool enabled) {labelsEnabled_ = enabled;} virtual void setUnreadMessageCount(int /*count*/) {} virtual void convertToMUC(MUCType /*mucType*/) {} virtual void setSecurityLabelsError() {} virtual SecurityLabelsCatalog::Item getSelectedSecurityLabel() {return label_;} virtual void setInputEnabled(bool /*enabled*/) {} virtual void setRosterModel(Roster* roster) { roster_ = roster; } Roster* getRosterModel() { return roster_; } virtual void setTabComplete(TabComplete*) {} void setAckState(const std::string& /*id*/, AckState /*state*/) {} virtual void flash() {} virtual void setAlert(const std::string& /*alertText*/, const std::string& /*buttonText*/) {} virtual void cancelAlert() {} virtual void setCorrectionEnabled(Tristate /*enabled*/) {} virtual void setFileTransferEnabled(Tristate /*enabled*/) {} void setAvailableOccupantActions(const std::vector<OccupantAction>&/* actions*/) {} void setSubject(const std::string& /*subject*/) {} virtual void showRoomConfigurationForm(Form::ref) {} virtual void addMUCInvitation(const std::string& /*senderName*/, const JID& /*jid*/, const std::string& /*reason*/, const std::string& /*password*/, bool = true, bool = false, bool = false) {} virtual std::string addWhiteboardRequest(bool) {return "";} virtual void setWhiteboardSessionStatus(std::string, const ChatWindow::WhiteboardSessionState){} virtual void setAffiliations(MUCOccupant::Affiliation, const std::vector<JID>&) {} virtual void setAvailableRoomActions(const std::vector<RoomAction> &) {} virtual void setBlockingState(BlockingState) {} virtual void setCanInitiateImpromptuChats(bool /*supportsImpromptu*/) {} virtual void showBookmarkWindow(const MUCBookmark& /*bookmark*/) {} std::string bodyFromMessage(const ChatMessage& message) { boost::shared_ptr<ChatTextMessagePart> text; |
Swift