mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Fix filtering without using regex
This commit is contained in:
parent
8c66945be9
commit
eeb48749ae
2 changed files with 4 additions and 2 deletions
|
@ -147,6 +147,7 @@ MemberList::MemberList(const QString &room_id, QObject *parent)
|
|||
void
|
||||
MemberList::setFilterString(const QString &text)
|
||||
{
|
||||
filterString = text;
|
||||
setFilterFixedString(text);
|
||||
}
|
||||
|
||||
|
@ -161,6 +162,6 @@ MemberList::sortBy(const MemberSortRoles role)
|
|||
bool
|
||||
MemberList::filterAcceptsRow(int source_row, const QModelIndex &) const
|
||||
{
|
||||
return m_model.m_memberList[source_row].first.user_id.contains(filterRegularExpression()) ||
|
||||
m_model.m_memberList[source_row].first.display_name.contains(filterRegularExpression());
|
||||
return m_model.m_memberList[source_row].first.user_id.contains(filterString) ||
|
||||
m_model.m_memberList[source_row].first.display_name.contains(filterString);
|
||||
}
|
||||
|
|
|
@ -122,5 +122,6 @@ protected:
|
|||
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
||||
|
||||
private:
|
||||
QString filterString;
|
||||
MemberListBackend m_model;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue