Search in viewer list by contained term (#2861)

Searching for users in the viewer list now searches anywhere in the user's name - instead of just searching at the beginning of the username.
This commit is contained in:
Tal Neoran 2021-06-04 13:51:35 +03:00 committed by GitHub
parent 508fea6382
commit 80fed27b4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -3,6 +3,7 @@
## Unversioned ## Unversioned
- Major: Added ability to toggle visibility of Channel Tabs - This can be done by right-clicking the tab area or pressing the keyboard shortcut (default: Ctrl+U). (#2600) - Major: Added ability to toggle visibility of Channel Tabs - This can be done by right-clicking the tab area or pressing the keyboard shortcut (default: Ctrl+U). (#2600)
- Minor: Searching for users in the viewer list now searches anywhere in the user's name. (#2861)
- Minor: Added moderation buttons to search popup when searching in a split with moderation mode enabled. (#2148, #2803) - Minor: Added moderation buttons to search popup when searching in a split with moderation mode enabled. (#2148, #2803)
- Minor: Made "#channel" in `/mentions` tab show in usercards and in the search popup. (#2802) - Minor: Made "#channel" in `/mentions` tab show in usercards and in the search popup. (#2802)
- Minor: Added settings to disable custom FrankerFaceZ VIP/mod badges. (#2693, #2759) - Minor: Added settings to disable custom FrankerFaceZ VIP/mod badges. (#2693, #2759)

View file

@ -722,7 +722,7 @@ void Split::showViewerList()
auto query = searchBar->text(); auto query = searchBar->text();
if (!query.isEmpty()) if (!query.isEmpty())
{ {
auto results = chattersList->findItems(query, Qt::MatchStartsWith); auto results = chattersList->findItems(query, Qt::MatchContains);
chattersList->hide(); chattersList->hide();
resultList->clear(); resultList->clear();
for (auto &item : results) for (auto &item : results)