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

Show active stories in profile top bar.

This commit is contained in:
John Preston
2023-06-20 19:31:40 +04:00
parent 738e20252e
commit d2dd63e90a
9 changed files with 143 additions and 8 deletions

View File

@@ -303,6 +303,11 @@ void WrapWidget::createTopBar() {
_controller->parentController()->closeThirdSection();
});
}
_topBar->storyClicks() | rpl::start_with_next([=] {
if (const auto peer = _controller->key().peer()) {
_controller->parentController()->openPeerStories(peer->id);
}
}, _topBar->lifetime());
if (wrapValue == Wrap::Layer) {
auto close = _topBar->addButton(
base::make_unique_q<Ui::IconButton>(
@@ -579,6 +584,7 @@ void WrapWidget::finishShowContent() {
_content->setIsStackBottom(!hasStackHistory());
if (_topBar) {
_topBar->setTitle(_content->title());
_topBar->setStories(_content->titleStories());
}
_desiredHeights.fire(desiredHeightForContent());
_desiredShadowVisibilities.fire(_content->desiredShadowVisibility());