Autosearch

Make the user search automatically. This includes a timer to ensure that we aren't constantly pinging the server as the user types, the search is started 0.5s after the user stops typing. The `PublicRoomListModel` is upgraded to work in the same manner as it was architected slightly differently.
This commit is contained in:
James Graham
2024-01-21 11:24:40 +00:00
parent 538cfbee8d
commit f48c2a21d9
5 changed files with 63 additions and 23 deletions

View File

@@ -59,6 +59,12 @@ void UserDirectoryListModel::setSearchText(const QString &value)
m_searchText = value;
Q_EMIT searchTextChanged();
if (m_job) {
m_job->abandon();
m_job = nullptr;
Q_EMIT searchingChanged();
}
attempted = false;
}