summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-07-11 14:03:57 (GMT)
committerSwift Review <review@swift.im>2014-07-27 14:09:54 (GMT)
commitfde89fee2175e7cbeda9262e7517f153de76e1b8 (patch)
tree9834c5d04a66c84fe50b1719e16c3749123fa8ff /Swift/Controllers/UIInterfaces
parent9353d3c692e1cd37bdd15b8dbe75b92be5eaa1c0 (diff)
downloadswift-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/UIInterfaces')
-rw-r--r--Swift/Controllers/UIInterfaces/ChatListWindow.h7
-rw-r--r--Swift/Controllers/UIInterfaces/ChatWindow.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h
index 38d8c3e..f7eb151 100644
--- a/Swift/Controllers/UIInterfaces/ChatListWindow.h
+++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h
@@ -21,9 +21,9 @@ namespace Swift {
public:
class Chat {
public:
- Chat() : statusType(StatusShow::None), isMUC(false), unreadCount(0) {}
- Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, StatusShow::Type statusType, const boost::filesystem::path& avatarPath, bool isMUC, const std::string& nick = "", const boost::optional<std::string> password = boost::optional<std::string>())
- : jid(jid), chatName(chatName), activity(activity), statusType(statusType), isMUC(isMUC), nick(nick), password(password), unreadCount(unreadCount), avatarPath(avatarPath) {}
+ Chat() : statusType(StatusShow::None), isMUC(false), unreadCount(0), isPrivateMessage(false) {}
+ Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, StatusShow::Type statusType, const boost::filesystem::path& avatarPath, bool isMUC, bool isPrivateMessage = false, const std::string& nick = "", const boost::optional<std::string> password = boost::optional<std::string>())
+ : jid(jid), chatName(chatName), activity(activity), statusType(statusType), isMUC(isMUC), nick(nick), password(password), unreadCount(unreadCount), avatarPath(avatarPath), isPrivateMessage(isPrivateMessage) {}
/** Assume that nicks and other transient features aren't important for equality */
bool operator==(const Chat& other) const {
if (impromptuJIDs.empty()) {
@@ -77,6 +77,7 @@ namespace Swift {
int unreadCount;
boost::filesystem::path avatarPath;
std::map<std::string, JID> impromptuJIDs;
+ bool isPrivateMessage;
};
virtual ~ChatListWindow();
diff --git a/Swift/Controllers/UIInterfaces/ChatWindow.h b/Swift/Controllers/UIInterfaces/ChatWindow.h
index bf4744b..81d26c8 100644
--- a/Swift/Controllers/UIInterfaces/ChatWindow.h
+++ b/Swift/Controllers/UIInterfaces/ChatWindow.h
@@ -130,6 +130,7 @@ namespace Swift {
virtual void setContactChatState(ChatState::ChatStateType state) = 0;
virtual void setName(const std::string& name) = 0;
virtual void show() = 0;
+ virtual bool isVisible() const = 0;
virtual void activate() = 0;
virtual void setAvailableSecurityLabels(const std::vector<SecurityLabelsCatalog::Item>& labels) = 0;
virtual void setSecurityLabelsEnabled(bool enabled) = 0;