mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-23 08:46:55 +00:00
Focus chats search by Ctrl[Cmd]+F.
This commit is contained in:
parent
b3eb1dbc14
commit
a62d1dfa63
@ -995,11 +995,17 @@ void Widget::setupShortcuts() {
|
|||||||
}) | rpl::start_with_next([=](not_null<Shortcuts::Request*> request) {
|
}) | rpl::start_with_next([=](not_null<Shortcuts::Request*> request) {
|
||||||
using Command = Shortcuts::Command;
|
using Command = Shortcuts::Command;
|
||||||
|
|
||||||
if (_openedForum && !controller()->activeChatCurrent()) {
|
if (!controller()->activeChatCurrent()) {
|
||||||
request->check(Command::Search) && request->handle([=] {
|
request->check(Command::Search) && request->handle([=] {
|
||||||
const auto history = _openedForum->history();
|
if (const auto forum = _openedForum) {
|
||||||
controller()->searchInChat(history);
|
const auto history = forum->history();
|
||||||
return true;
|
controller()->searchInChat(history);
|
||||||
|
return true;
|
||||||
|
} else if (!_openedFolder && _search->isVisible()) {
|
||||||
|
_search->setFocus();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
Loading…
Reference in New Issue
Block a user