Fix empty stories list hiding.

This commit is contained in:
John Preston 2023-07-11 19:41:33 +04:00
parent 06469270d0
commit dfd1aa5cd6

View file

@ -852,6 +852,10 @@ void Widget::setupStories() {
0); 0);
} }
}, lifetime()); }, lifetime());
_stories->emptyValue() | rpl::skip(1) | rpl::start_with_next([=] {
updateStoriesVisibility();
}, lifetime());
} }
void Widget::storiesToggleExplicitExpand(bool expand) { void Widget::storiesToggleExplicitExpand(bool expand) {
@ -1363,7 +1367,8 @@ void Widget::updateStoriesVisibility() {
|| !_widthAnimationCache.isNull() || !_widthAnimationCache.isNull()
|| _childList || _childList
|| !_filter->getLastText().isEmpty() || !_filter->getLastText().isEmpty()
|| _searchInChat; || _searchInChat
|| _stories->empty();
if (_stories->isHidden() != hidden) { if (_stories->isHidden() != hidden) {
_stories->setVisible(!hidden); _stories->setVisible(!hidden);
using Type = Ui::ElasticScroll::OverscrollType; using Type = Ui::ElasticScroll::OverscrollType;