mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Optimized height refresh of non-main list on receiving chats filters.
This commit is contained in:
parent
632abd2225
commit
889fcb3939
1 changed files with 7 additions and 3 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue