From 28acea55e2efd76dd85bba4f343a668c3015db3b Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 16 Jun 2022 01:49:51 +0200 Subject: Remove redundant alias function --- src/RoomsModel.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/RoomsModel.cpp') diff --git a/src/RoomsModel.cpp b/src/RoomsModel.cpp index 782c4971..68cfaf1b 100644 --- a/src/RoomsModel.cpp +++ b/src/RoomsModel.cpp @@ -23,17 +23,19 @@ RoomsModel::RoomsModel(bool showOnlyRoomWithAliases, QObject *parent) } for (const auto &r : rooms_) { - auto roomAliasesList = cache::client()->getRoomAliases(r); + auto roomAliasesList = + cache::client()->getStateEvent(r); if (showOnlyRoomWithAliases_) { - if (roomAliasesList && !roomAliasesList->alias.empty()) { + if (roomAliasesList && !roomAliasesList->content.alias.empty()) { roomids.push_back(QString::fromStdString(r)); - roomAliases.push_back(QString::fromStdString(roomAliasesList->alias)); + roomAliases.push_back(QString::fromStdString(roomAliasesList->content.alias)); } } else { roomids.push_back(QString::fromStdString(r)); - roomAliases.push_back(roomAliasesList ? QString::fromStdString(roomAliasesList->alias) - : QLatin1String("")); + roomAliases.push_back(roomAliasesList + ? QString::fromStdString(roomAliasesList->content.alias) + : QLatin1String("")); } } } -- cgit 1.4.1