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

Implement search in topics / forum messages.

This commit is contained in:
John Preston
2022-10-26 13:30:10 +04:00
parent c8ed8e0e5f
commit 88d1a502a5
8 changed files with 357 additions and 103 deletions

View File

@@ -83,7 +83,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Window {
namespace {
constexpr auto kTopicsSearchMinCount = 10;
constexpr auto kTopicsSearchMinCount = 1;
} // namespace
@@ -1005,8 +1005,14 @@ void Filler::addViewAsMessages() {
}
void Filler::addSearchTopics() {
const auto forum = _peer ? _peer->forum() : nullptr;
if (!forum) {
return;
}
const auto history = forum->history();
const auto controller = _controller;
_addAction(tr::lng_dlg_filter(tr::now), [=] {
controller->content()->searchInChat(history);
}, &st::menuIconSearch);
}