diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-09 10:42:47 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-07-09 10:42:47 (GMT) |
commit | c2dc47077e505ba1d45f203772dc6aa4f26656e4 (patch) | |
tree | 097cba7a95bffb3f8e7d251164d0df8a07e52822 /Swift/Controllers/UIInterfaces | |
parent | 21e1e2d829690a127386071f173ffd8ad2e21db4 (diff) | |
download | swift-contrib-c2dc47077e505ba1d45f203772dc6aa4f26656e4.zip swift-contrib-c2dc47077e505ba1d45f203772dc6aa4f26656e4.tar.bz2 |
Remember status type for chat list items.
Resolves: #905
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatListWindow.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatListWindow.h b/Swift/Controllers/UIInterfaces/ChatListWindow.h index 477de04..94d400d 100644 --- a/Swift/Controllers/UIInterfaces/ChatListWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatListWindow.h @@ -9,16 +9,17 @@ #include <list> #include <boost/shared_ptr.hpp> #include <Swiften/MUC/MUCBookmark.h> +#include <Swiften/Elements/StatusShow.h> -#include "Swiften/Base/boost_bsignals.h" +#include <Swiften/Base/boost_bsignals.h> namespace Swift { class ChatListWindow { public: class Chat { public: - Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, bool isMUC, const std::string& nick = "") - : jid(jid), chatName(chatName), activity(activity), isMUC(isMUC), nick(nick), unreadCount(unreadCount) {} + Chat(const JID& jid, const std::string& chatName, const std::string& activity, int unreadCount, StatusShow::Type statusType, bool isMUC, const std::string& nick = "") + : jid(jid), chatName(chatName), activity(activity), statusType(statusType), isMUC(isMUC), nick(nick), unreadCount(unreadCount) {} /** Assume that nicks and other transient features aren't important for equality */ bool operator==(const Chat& other) const { return jid.toBare() == other.jid.toBare() @@ -27,9 +28,13 @@ namespace Swift { void setUnreadCount(int unread) { unreadCount = unread; } + void setStatusType(StatusShow::Type type) { + statusType = type; + } JID jid; std::string chatName; std::string activity; + StatusShow::Type statusType; bool isMUC; std::string nick; int unreadCount; |