diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-11 13:12:43 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-11 13:12:43 +0200 |
commit | d8c0d4874bb1864a677ae451d93727ab75484f84 (patch) | |
tree | db3dda668b8d265134d49586e96f4a2dd814d906 /src/timeline | |
parent | Basic community list model (diff) | |
download | nheko-d8c0d4874bb1864a677ae451d93727ab75484f84.tar.xz |
Render community items
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/CommunitiesModel.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/timeline/CommunitiesModel.cpp b/src/timeline/CommunitiesModel.cpp index cedaacce..c8ebaa96 100644 --- a/src/timeline/CommunitiesModel.cpp +++ b/src/timeline/CommunitiesModel.cpp @@ -21,6 +21,7 @@ CommunitiesModel::roleNames() const {DisplayName, "displayName"}, {Tooltip, "tooltip"}, {ChildrenHidden, "childrenHidden"}, + {Id, "id"}, }; } @@ -74,9 +75,9 @@ CommunitiesModel::data(const QModelIndex &index, int role) const case CommunitiesModel::Roles::AvatarUrl: return QString(":/icons/icons/ui/tag.png"); case CommunitiesModel::Roles::DisplayName: - return tag.right(2); + return tag.mid(2); case CommunitiesModel::Roles::Tooltip: - return tag.right(2); + return tag.mid(2); } } @@ -143,7 +144,7 @@ void CommunitiesModel::setCurrentTagId(QString tagId) { if (tagId.startsWith("tag:")) { - auto tag = tagId.remove(0, 4); + auto tag = tagId.mid(4); for (const auto &t : tags_) { if (t == tag) { this->currentTagId_ = tagId; |