summary refs log tree commit diff
path: root/src/timeline/CommunitiesModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeline/CommunitiesModel.cpp')
-rw-r--r--src/timeline/CommunitiesModel.cpp14
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) {