summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanos Doukoudakis <thanos.doukoudakis@isode.com>2018-05-17 16:36:44 (GMT)
committerKevin Smith <kevin.smith@isode.com>2018-06-21 12:45:20 (GMT)
commit2bb40b14d3d7f5cebc56601dad066d5201040bd2 (patch)
tree5f208aa9a3b88c8fe0725aca1bd5d97451d45e2f /Swiften/MUC/MUCBookmarkManager.h
parent83434963a7b10b759ffe3fdc1312efdef282a450 (diff)
downloadswift-2bb40b14d3d7f5cebc56601dad066d5201040bd2.zip
swift-2bb40b14d3d7f5cebc56601dad066d5201040bd2.tar.bz2
Add a leave room option in MUC rooms
This patch will add a leave room option in the cog menu of a MUC room, allowing the user to leave the room and close the window. Additionally when joining or leaving a room the autojoin field will change to true or false respectively. This patch also fixes a minor issue with a gui option that was not identifying bookmarked rooms at the cog menu. The autojoin option on the Enter room, Bookmark room and Edit Bookmark menu has been removed, since the default behaviour will be to automatically bookmark every MUC room the user joins, setting autojoin to true. If the user chooses to leave the room, then the autojoin flag will be set to false and the bookmark will be updated. Test-Information: Tested the changes in the UI in Windows Qt 5.9. Updated the ChatsManagerTests unit tests to check the chattables and the behaviour of the bookmarks, when joining and leaving MUCs. Change-Id: Iad1f34480a1e0b9df25c73b49247acc7b7825e20
Diffstat (limited to 'Swiften/MUC/MUCBookmarkManager.h')
-rw-r--r--Swiften/MUC/MUCBookmarkManager.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/MUC/MUCBookmarkManager.h b/Swiften/MUC/MUCBookmarkManager.h
index 78fbbb0..7f262da 100644
--- a/Swiften/MUC/MUCBookmarkManager.h
+++ b/Swiften/MUC/MUCBookmarkManager.h
@@ -27,8 +27,8 @@ namespace Swift {
void addBookmark(const MUCBookmark& bookmark);
void removeBookmark(const MUCBookmark& bookmark);
void replaceBookmark(const MUCBookmark& oldBookmark, const MUCBookmark& newBookmark);
-
const std::vector<MUCBookmark>& getBookmarks() const;
+ boost::optional<MUCBookmark> lookupBookmark(const JID& bookmarkJID) const;
public:
boost::signals2::signal<void (const MUCBookmark&)> onBookmarkAdded;
@@ -45,6 +45,7 @@ namespace Swift {
private:
bool ready_;
+ bool handlingReceivedBookmarks_;
std::vector<MUCBookmark> bookmarks_;
IQRouter* iqRouter_;
std::shared_ptr<Storage> storage;