Optimized height refresh of non-main list on receiving chats filters.

This commit is contained in:
23rd 2024-11-20 07:51:40 +03:00
parent 632abd2225
commit 889fcb3939

View file

@ -287,9 +287,13 @@ InnerWidget::InnerWidget(
}, lifetime());
rpl::merge(
session().settings().archiveCollapsedChanges() | rpl::to_empty,
session().data().chatsFilters().changed()
) | rpl::start_with_next([=] {
session().settings().archiveCollapsedChanges() | rpl::map_to(false),
session().data().chatsFilters().changed() | rpl::map_to(true)
) | rpl::start_with_next([=](bool refreshHeight) {
if (refreshHeight && _filterId) {
// Height of the main list will be refreshed in other way.
_shownList->updateHeights(_narrowRatio);
}
refreshWithCollapsedRows();
}, lifetime());