diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2022-04-19 20:49:37 -0400 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2022-06-29 22:00:09 -0400 |
commit | e7c24b094fcf400acd6b038105e13272cf87d617 (patch) | |
tree | e403b032f32278dc478c3d9d631425a9eeeb634d | |
parent | Display unread notifications for spaces (diff) | |
download | nheko-e7c24b094fcf400acd6b038105e13272cf87d617.tar.xz |
Fix typoed variable name
-rw-r--r-- | src/timeline/CommunitiesModel.cpp | 18 | ||||
-rw-r--r-- | src/timeline/CommunitiesModel.h | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/timeline/CommunitiesModel.cpp b/src/timeline/CommunitiesModel.cpp index b88896ee..116fa0a0 100644 --- a/src/timeline/CommunitiesModel.cpp +++ b/src/timeline/CommunitiesModel.cpp @@ -94,7 +94,7 @@ CommunitiesModel::data(const QModelIndex &index, int role) const case CommunitiesModel::Roles::Collapsible: return false; case CommunitiesModel::Roles::Hidden: - return hiddentTagIds_.contains(QStringLiteral("dm")); + return hiddenTagIds_.contains(QStringLiteral("dm")); case CommunitiesModel::Roles::Parent: return ""; case CommunitiesModel::Roles::Depth: @@ -119,7 +119,7 @@ CommunitiesModel::data(const QModelIndex &index, int role) const return idx != spaceOrder_.lastChild(idx); } case CommunitiesModel::Roles::Hidden: - return hiddentTagIds_.contains("space:" + id); + return hiddenTagIds_.contains("space:" + id); case CommunitiesModel::Roles::Parent: { if (auto p = spaceOrder_.parent(index.row() - 2); p >= 0) return spaceOrder_.tree[p].id; @@ -174,7 +174,7 @@ CommunitiesModel::data(const QModelIndex &index, int role) const switch (role) { case CommunitiesModel::Roles::Hidden: - return hiddentTagIds_.contains("tag:" + tag); + return hiddenTagIds_.contains("tag:" + tag); case CommunitiesModel::Roles::Collapsed: return true; case CommunitiesModel::Roles::Collapsible: @@ -293,7 +293,7 @@ CommunitiesModel::initializeSidebar() for (const auto &t : ts) tags_.push_back(QString::fromStdString(t)); - hiddentTagIds_ = UserSettings::instance()->hiddenTags(); + hiddenTagIds_ = UserSettings::instance()->hiddenTags(); spaceOrder_.restoreCollapsed(); endResetModel(); @@ -441,12 +441,12 @@ CommunitiesModel::setCurrentTagId(const QString &tagId) void CommunitiesModel::toggleTagId(QString tagId) { - if (hiddentTagIds_.contains(tagId)) { - hiddentTagIds_.removeOne(tagId); - UserSettings::instance()->setHiddenTags(hiddentTagIds_); + if (hiddenTagIds_.contains(tagId)) { + hiddenTagIds_.removeOne(tagId); + UserSettings::instance()->setHiddenTags(hiddenTagIds_); } else { - hiddentTagIds_.push_back(tagId); - UserSettings::instance()->setHiddenTags(hiddentTagIds_); + hiddenTagIds_.push_back(tagId); + UserSettings::instance()->setHiddenTags(hiddenTagIds_); } if (tagId.startsWith(QLatin1String("tag:"))) { diff --git a/src/timeline/CommunitiesModel.h b/src/timeline/CommunitiesModel.h index d54d9907..30980f00 100644 --- a/src/timeline/CommunitiesModel.h +++ b/src/timeline/CommunitiesModel.h @@ -152,7 +152,7 @@ private: QStringList tags_; QString currentTagId_; - QStringList hiddentTagIds_; + QStringList hiddenTagIds_; FlatTree spaceOrder_; std::map<QString, RoomInfo> spaces_; |