2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Add search button to info members header.

This commit is contained in:
John Preston
2017-12-08 12:14:30 +04:00
parent 8f87cfe29d
commit b501af0b8f
11 changed files with 122 additions and 76 deletions

View File

@@ -347,7 +347,8 @@ void WrapWidget::createTopBar() {
Assert(search != nullptr);
_topBar->createSearchView(
search,
_controller->searchEnabledByContent());
_controller->searchEnabledByContent(),
_controller->takeSearchStartsFocused());
}
if (_controller->section().type() == Section::Type::Profile
&& (wrapValue != Wrap::Side || hasStackHistory())) {
@@ -669,7 +670,9 @@ void WrapWidget::showAnimatedHook(
}
void WrapWidget::doSetInnerFocus() {
_content->setInnerFocus();
if (!_topBar->focusSearchField()) {
_content->setInnerFocus();
}
}
void WrapWidget::showFinishedHook() {
@@ -815,6 +818,9 @@ void WrapWidget::showNewContent(
showNewContent(memento);
}
if (animationParams) {
if (Ui::InFocusChain(this)) {
setFocus();
}
showAnimated(
saveToStack
? SlideDirection::FromRight