1 files changed, 14 insertions, 0 deletions
diff --git a/src/timeline/CommunitiesModel.cpp b/src/timeline/CommunitiesModel.cpp
index 72d0bdfb..a0c73f84 100644
--- a/src/timeline/CommunitiesModel.cpp
+++ b/src/timeline/CommunitiesModel.cpp
@@ -605,6 +605,20 @@ CommunitiesModel::setCurrentTagId(const QString &tagId)
emit currentTagIdChanged(currentTagId_);
}
+bool
+CommunitiesModel::trySwitchToSpace(const QString &tag)
+{
+ for (const auto &t : spaceOrder_.tree) {
+ if (t.id == tag) {
+ this->currentTagId_ = "space:" + tag;
+ emit currentTagIdChanged(currentTagId_);
+ return true;
+ }
+ }
+
+ return false;
+}
+
void
CommunitiesModel::toggleTagId(QString tagId)
{
|