2
0
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:
RadRussianRus
2020-04-22 08:03:34 +03:00
parent 7ba072b0dd
commit 2c1153bac9
10 changed files with 30 additions and 10 deletions

View File

@@ -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() {