mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Fix typoed variable name
This commit is contained in:
parent
2df2046d1d
commit
e7c24b094f
2 changed files with 10 additions and 10 deletions
|
@ -94,7 +94,7 @@ CommunitiesModel::data(const QModelIndex &index, int role) const
|
||||||
case CommunitiesModel::Roles::Collapsible:
|
case CommunitiesModel::Roles::Collapsible:
|
||||||
return false;
|
return false;
|
||||||
case CommunitiesModel::Roles::Hidden:
|
case CommunitiesModel::Roles::Hidden:
|
||||||
return hiddentTagIds_.contains(QStringLiteral("dm"));
|
return hiddenTagIds_.contains(QStringLiteral("dm"));
|
||||||
case CommunitiesModel::Roles::Parent:
|
case CommunitiesModel::Roles::Parent:
|
||||||
return "";
|
return "";
|
||||||
case CommunitiesModel::Roles::Depth:
|
case CommunitiesModel::Roles::Depth:
|
||||||
|
@ -119,7 +119,7 @@ CommunitiesModel::data(const QModelIndex &index, int role) const
|
||||||
return idx != spaceOrder_.lastChild(idx);
|
return idx != spaceOrder_.lastChild(idx);
|
||||||
}
|
}
|
||||||
case CommunitiesModel::Roles::Hidden:
|
case CommunitiesModel::Roles::Hidden:
|
||||||
return hiddentTagIds_.contains("space:" + id);
|
return hiddenTagIds_.contains("space:" + id);
|
||||||
case CommunitiesModel::Roles::Parent: {
|
case CommunitiesModel::Roles::Parent: {
|
||||||
if (auto p = spaceOrder_.parent(index.row() - 2); p >= 0)
|
if (auto p = spaceOrder_.parent(index.row() - 2); p >= 0)
|
||||||
return spaceOrder_.tree[p].id;
|
return spaceOrder_.tree[p].id;
|
||||||
|
@ -174,7 +174,7 @@ CommunitiesModel::data(const QModelIndex &index, int role) const
|
||||||
|
|
||||||
switch (role) {
|
switch (role) {
|
||||||
case CommunitiesModel::Roles::Hidden:
|
case CommunitiesModel::Roles::Hidden:
|
||||||
return hiddentTagIds_.contains("tag:" + tag);
|
return hiddenTagIds_.contains("tag:" + tag);
|
||||||
case CommunitiesModel::Roles::Collapsed:
|
case CommunitiesModel::Roles::Collapsed:
|
||||||
return true;
|
return true;
|
||||||
case CommunitiesModel::Roles::Collapsible:
|
case CommunitiesModel::Roles::Collapsible:
|
||||||
|
@ -293,7 +293,7 @@ CommunitiesModel::initializeSidebar()
|
||||||
for (const auto &t : ts)
|
for (const auto &t : ts)
|
||||||
tags_.push_back(QString::fromStdString(t));
|
tags_.push_back(QString::fromStdString(t));
|
||||||
|
|
||||||
hiddentTagIds_ = UserSettings::instance()->hiddenTags();
|
hiddenTagIds_ = UserSettings::instance()->hiddenTags();
|
||||||
spaceOrder_.restoreCollapsed();
|
spaceOrder_.restoreCollapsed();
|
||||||
|
|
||||||
endResetModel();
|
endResetModel();
|
||||||
|
@ -441,12 +441,12 @@ CommunitiesModel::setCurrentTagId(const QString &tagId)
|
||||||
void
|
void
|
||||||
CommunitiesModel::toggleTagId(QString tagId)
|
CommunitiesModel::toggleTagId(QString tagId)
|
||||||
{
|
{
|
||||||
if (hiddentTagIds_.contains(tagId)) {
|
if (hiddenTagIds_.contains(tagId)) {
|
||||||
hiddentTagIds_.removeOne(tagId);
|
hiddenTagIds_.removeOne(tagId);
|
||||||
UserSettings::instance()->setHiddenTags(hiddentTagIds_);
|
UserSettings::instance()->setHiddenTags(hiddenTagIds_);
|
||||||
} else {
|
} else {
|
||||||
hiddentTagIds_.push_back(tagId);
|
hiddenTagIds_.push_back(tagId);
|
||||||
UserSettings::instance()->setHiddenTags(hiddentTagIds_);
|
UserSettings::instance()->setHiddenTags(hiddenTagIds_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tagId.startsWith(QLatin1String("tag:"))) {
|
if (tagId.startsWith(QLatin1String("tag:"))) {
|
||||||
|
|
|
@ -152,7 +152,7 @@ private:
|
||||||
|
|
||||||
QStringList tags_;
|
QStringList tags_;
|
||||||
QString currentTagId_;
|
QString currentTagId_;
|
||||||
QStringList hiddentTagIds_;
|
QStringList hiddenTagIds_;
|
||||||
FlatTree spaceOrder_;
|
FlatTree spaceOrder_;
|
||||||
std::map<QString, RoomInfo> spaces_;
|
std::map<QString, RoomInfo> spaces_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue