mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Search users' names in addition to their messages
This commit is contained in:
parent
a0fe13127d
commit
d299f7af5c
1 changed files with 5 additions and 3 deletions
|
@ -223,9 +223,11 @@ TimelineFilter::filterAcceptsRow(int source_row, const QModelIndex &) const
|
||||||
|
|
||||||
if (auto s = sourceModel()) {
|
if (auto s = sourceModel()) {
|
||||||
auto idx = s->index(source_row, 0);
|
auto idx = s->index(source_row, 0);
|
||||||
if (!contentFilter.isEmpty() && !s->data(idx, TimelineModel::Body)
|
if (
|
||||||
.toString()
|
!contentFilter.isEmpty()
|
||||||
.contains(contentFilter, Qt::CaseInsensitive)) {
|
&& !s->data(idx, TimelineModel::Body).toString().contains(contentFilter, Qt::CaseInsensitive)
|
||||||
|
&& !s->data(idx, TimelineModel::UserName).toString().contains(contentFilter, Qt::CaseInsensitive)
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue