2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Simplified geometry management of chats filters strip.

This commit is contained in:
23rd
2024-11-04 16:41:16 +03:00
parent ba0da9f59e
commit 146409844d
5 changed files with 32 additions and 43 deletions

View File

@@ -2110,12 +2110,16 @@ QPointer<Ui::BoxContent> ShowForwardMessagesBox(
});
box->peerListRefreshRows();
};
Ui::AddChatFiltersTabsStrip(
const auto chatsFilters = Ui::AddChatFiltersTabsStrip(
box,
session,
box->multiSelectHeightValue(),
[=](int height) { box->setAddedTopScrollSkip(height); },
std::move(applyFilter));
chatsFilters->heightValue() | rpl::start_with_next([box](int h) {
box->setAddedTopScrollSkip(h);
}, box->lifetime());
box->multiSelectHeightValue() | rpl::start_with_next([=](int h) {
chatsFilters->moveToLeft(0, h);
}, chatsFilters->lifetime());
};
auto box = Box<ListBox>(std::move(controller), std::move(init));
const auto boxRaw = box.data();