diff options
Diffstat (limited to 'connection.cpp')
-rw-r--r-- | connection.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/connection.cpp b/connection.cpp index 7914639e..1c65d66f 100644 --- a/connection.cpp +++ b/connection.cpp @@ -534,6 +534,17 @@ QHash<QString, QVector<Room*>> Connection::tagsToRooms() const return result; } +QStringList Connection::tagNames() const +{ + QStringList tags ({"m.favourite"}); + for (auto* r: d->roomMap) + for (const auto& tag: r->tagNames()) + if (tag != "m.lowpriority" && !tags.contains(tag)) + tags.push_back(tag); + tags.push_back("m.lowpriority"); + return tags; +} + QVector<Room*> Connection::roomsWithTag(const QString& tagName) const { QVector<Room*> rooms; |