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

Provide section title from the section class.

This commit is contained in:
John Preston
2022-04-04 10:36:45 +04:00
parent b1e3b9688e
commit d9bbfeead1
20 changed files with 110 additions and 94 deletions

View File

@@ -355,10 +355,6 @@ void WrapWidget::createTopBar() {
_content->selectionAction(action);
}, _topBar->lifetime());
_topBar->setTitle(TitleValue(
_controller->section(),
_controller->key(),
!hasStackHistory()));
if (wrapValue == Wrap::Narrow || hasStackHistory()) {
_topBar->enableBackButton();
_topBar->backRequest(
@@ -616,8 +612,9 @@ void WrapWidget::showContent(object_ptr<ContentWidget> content) {
}
void WrapWidget::finishShowContent() {
_content->setIsStackBottom(!hasStackHistory());
updateContentGeometry();
_content->setIsStackBottom(!hasStackHistory());
_topBar->setTitle(_content->title());
_desiredHeights.fire(desiredHeightForContent());
_desiredShadowVisibilities.fire(_content->desiredShadowVisibility());
_selectedLists.fire(_content->selectedListValue());