From d299f7af5cfa5605d3501a5b744854051710ffe6 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Thu, 9 Feb 2023 18:23:54 +0100 Subject: [PATCH] Search users' names in addition to their messages --- src/timeline/TimelineFilter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/timeline/TimelineFilter.cpp b/src/timeline/TimelineFilter.cpp index d59d517e..b2c6e405 100644 --- a/src/timeline/TimelineFilter.cpp +++ b/src/timeline/TimelineFilter.cpp @@ -223,9 +223,11 @@ TimelineFilter::filterAcceptsRow(int source_row, const QModelIndex &) const if (auto s = sourceModel()) { auto idx = s->index(source_row, 0); - if (!contentFilter.isEmpty() && !s->data(idx, TimelineModel::Body) - .toString() - .contains(contentFilter, Qt::CaseInsensitive)) { + if ( + !contentFilter.isEmpty() + && !s->data(idx, TimelineModel::Body).toString().contains(contentFilter, Qt::CaseInsensitive) + && !s->data(idx, TimelineModel::UserName).toString().contains(contentFilter, Qt::CaseInsensitive) + ) { return false; }