Set profile top bar as flexible.

This commit is contained in:
23rd
2025-10-08 11:51:41 +03:00
parent f17e13cad0
commit 5468fde492
2 changed files with 6 additions and 1 deletions
@@ -65,6 +65,7 @@ const style::InfoTopBar &TopBarStyle(Wrap wrap) {
[[nodiscard]] bool HasCustomTopBar(not_null<const Controller*> controller) {
const auto section = controller->section();
return (section.type() == Section::Type::BotStarRef)
|| (section.type() == Section::Type::Profile)
|| ((section.type() == Section::Type::Settings)
&& section.settingsType()->hasCustomTopBar());
}
@@ -326,12 +326,16 @@ int InnerWidget::resizeGetHeight(int newWidth) {
}
bool InnerWidget::hasFlexibleTopBar() const {
return false;
return true;
}
base::weak_qptr<Ui::RpWidget> InnerWidget::createPinnedToTop(
not_null<Ui::RpWidget*> parent) {
const auto content = Ui::CreateChild<TopBar>(parent);
_controller->wrapValue(
) | rpl::start_with_next([=](Wrap wrap) {
content->setRoundEdges(wrap == Wrap::Layer);
}, content->lifetime());
return base::make_weak(not_null<Ui::RpWidget*>{ content });
}