Fix nits from code review
This commit is contained in:
parent
2dfccda73c
commit
6a75e5270c
7 changed files with 7 additions and 19 deletions
|
|
@ -42,9 +42,7 @@ RoomDirectoryModel::resetDisplayedData()
|
|||
nextBatch_ = "";
|
||||
canFetchMore_ = true;
|
||||
|
||||
beginRemoveRows(QModelIndex(), 0, static_cast<int>(publicRoomsData_.size()));
|
||||
publicRoomsData_.clear();
|
||||
endRemoveRows();
|
||||
|
||||
endResetModel();
|
||||
}
|
||||
|
|
@ -87,8 +85,7 @@ RoomDirectoryModel::getViasForRoom(const std::vector<std::string> &aliases)
|
|||
|
||||
std::transform(
|
||||
aliases.begin(), aliases.end(), std::back_inserter(vias), [](const auto &alias) {
|
||||
const auto roomAliasDelimiter = ":";
|
||||
return alias.substr(alias.find(roomAliasDelimiter) + 1);
|
||||
return alias.substr(alias.find(":") + 1);
|
||||
});
|
||||
|
||||
return vias;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ public:
|
|||
|
||||
inline bool canFetchMore(const QModelIndex &) const override
|
||||
{
|
||||
nhlog::net()->debug("determining if can fetch more");
|
||||
return canFetchMore_;
|
||||
}
|
||||
void fetchMore(const QModelIndex &) override;
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par
|
|||
"Error: Only enums");
|
||||
|
||||
qmlRegisterType<RoomDirectoryModel>(
|
||||
"im.nheko.RoomDirectoryModel", 1, 0, "RoomDirectoryModel");
|
||||
"im.nheko", 1, 0, "RoomDirectoryModel");
|
||||
|
||||
#ifdef USE_QUICK_VIEW
|
||||
view = new QQuickView(parent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue