2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Support tags in ComposeSearch.

This commit is contained in:
John Preston
2024-01-30 12:35:07 +04:00
parent 323500f6dd
commit 39b80c98c7
12 changed files with 220 additions and 51 deletions

View File

@@ -1928,11 +1928,10 @@ void Widget::searchMessages(QString query, Key inChat) {
controller()->closeFolder();
}
auto tags = std::vector<Data::ReactionId>();
if (const auto tagId = Data::SearchTagFromQuery(query)) {
auto tags = Data::SearchTagsFromQuery(query);
if (!tags.empty()) {
inChat = session().data().history(session().user());
query = QString();
tags.push_back(tagId);
}
const auto inChatChanged = [&] {
const auto inPeer = inChat.peer();