Fix search in group/channel requests list.

This commit is contained in:
John Preston 2024-11-29 10:17:42 +04:00
parent cf2dbe50a1
commit 03e4592082
4 changed files with 8 additions and 9 deletions

View file

@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "info/common_groups/info_common_groups_inner_widget.h"
#include "info/info_controller.h"
#include "ui/search_field_controller.h"
#include "ui/widgets/scroll_area.h"
#include "ui/ui_utility.h"
#include "lang/lang_keys.h"

View file

@ -208,6 +208,7 @@ void TopBar::setSearchField(
rpl::producer<bool> &&shown,
bool startsFocused) {
Expects(field != nullptr);
createSearchView(field.release(), std::move(shown), startsFocused);
}

View file

@ -527,14 +527,14 @@ void WrapWidget::showTopBarMenu(bool check) {
}
bool WrapWidget::requireTopBarSearch() const {
if (!_topBar || !_controller->searchFieldController()) {
if (!_topBar
|| !_controller->searchFieldController()
|| (_controller->wrap() == Wrap::Layer)
|| (_controller->section().type() == Section::Type::Profile)
|| key().isDownloads()) {
return false;
} else if (_controller->wrap() == Wrap::Layer
|| _controller->section().type() == Section::Type::Profile) {
return false;
} else if (key().isDownloads()) {
return false;
} else if (hasStackHistory()) {
} else if (hasStackHistory()
|| _controller->section().type() == Section::Type::RequestsList) {
return true;
}
return false;

View file

@ -15,7 +15,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "info/info_controller.h"
#include "ui/controls/who_reacted_context_action.h"
#include "ui/widgets/scroll_area.h"
#include "ui/search_field_controller.h"
#include "ui/ui_utility.h"
#include "lang/lang_keys.h"
#include "styles/style_info.h"