Fixed selecting of stickers in userpic emoji builder.

This commit is contained in:
23rd 2023-01-26 12:59:30 +03:00 committed by John Preston
parent 9c43f9c3e2
commit a23bd5f3ff
1 changed files with 5 additions and 4 deletions

View File

@ -279,10 +279,11 @@ void EmojiSelector::createSelector(Type type) {
createSelector(isEmoji ? Type::Stickers : Type::Emoji);
});
_scroll->scrollTopChanges(
) | rpl::start_with_next([=] {
const auto scrollTop = _scroll->scrollTop();
const auto scrollBottom = scrollTop + _scroll->height();
rpl::combine(
_scroll->scrollTopValue(),
_scroll->heightValue()
) | rpl::start_with_next([=](int scrollTop, int scrollHeight) {
const auto scrollBottom = scrollTop + scrollHeight;
selector.list->setVisibleTopBottom(scrollTop, scrollBottom);
}, selector.list->lifetime());