mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 00:55:12 +00:00
Search user messages from context menu
This commit is contained in:
@@ -913,7 +913,8 @@ void Widget::showMainMenu() {
|
||||
|
||||
void Widget::searchMessages(
|
||||
const QString &query,
|
||||
Key inChat) {
|
||||
Key inChat,
|
||||
UserData *from) {
|
||||
auto inChatChanged = [&] {
|
||||
if (inChat == _searchInChat) {
|
||||
return false;
|
||||
@@ -929,7 +930,9 @@ void Widget::searchMessages(
|
||||
onCancelSearch();
|
||||
setSearchInChat(inChat);
|
||||
}
|
||||
_filter->setText(query);
|
||||
if (!query.trimmed().isEmpty()) {
|
||||
_filter->setText(query);
|
||||
}
|
||||
_filter->updatePlaceholder();
|
||||
applyFilterUpdate(true);
|
||||
_searchTimer.stop();
|
||||
@@ -937,6 +940,10 @@ void Widget::searchMessages(
|
||||
|
||||
Local::saveRecentSearchHashtags(query);
|
||||
}
|
||||
if (inChat && from) {
|
||||
setSearchInChat(inChat, from);
|
||||
applyFilterUpdate(true);
|
||||
}
|
||||
}
|
||||
|
||||
void Widget::onSearchMore() {
|
||||
|
Reference in New Issue
Block a user