Fixed scroll in Dialogs::Widget.

Regression was introduced in cb8f49aea0.
This commit is contained in:
23rd 2021-10-02 16:03:26 +03:00 committed by John Preston
parent 24fa3dbf8f
commit 1fa5d273cc

View file

@ -205,7 +205,11 @@ Widget::Widget(
) | rpl::to_empty);
connect(_inner, SIGNAL(draggingScrollDelta(int)), this, SLOT(onDraggingScrollDelta(int)));
connect(_inner, SIGNAL(mustScrollTo(int,int)), _scroll, SLOT(scrollToY(int,int)));
connect(_inner, &InnerWidget::mustScrollTo, [=](int top, int bottom) {
if (_scroll) {
_scroll->scrollToY(top, bottom);
}
});
connect(_inner, SIGNAL(dialogMoved(int,int)), this, SLOT(onDialogMoved(int,int)));
connect(_inner, SIGNAL(searchMessages()), this, SLOT(onNeedSearchMessages()));
connect(_inner, SIGNAL(completeHashtag(QString)), this, SLOT(onCompleteHashtag(QString)));
@ -238,7 +242,10 @@ Widget::Widget(
) | rpl::start_with_next(crl::guard(_inner, [=] {
_inner->onParentGeometryChanged();
}), lifetime());
connect(_scroll, SIGNAL(scrolled()), this, SLOT(onListScroll()));
_scroll->scrolls(
) | rpl::start_with_next([=] {
onListScroll();
}, lifetime());
session().data().chatsListChanges(
) | rpl::filter([=](Data::Folder *folder) {