mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix scrolling expanded frequent contacts.
This commit is contained in:
parent
7289292f02
commit
129d356909
3 changed files with 12 additions and 0 deletions
|
@ -970,6 +970,11 @@ void Suggestions::setupChats() {
|
||||||
_chatsScroll->scrollToY(request.ymin, request.ymax);
|
_chatsScroll->scrollToY(request.ymin, request.ymax);
|
||||||
}, _topPeers->lifetime());
|
}, _topPeers->lifetime());
|
||||||
|
|
||||||
|
_topPeers->verticalScrollEvents(
|
||||||
|
) | rpl::start_with_next([=](not_null<QWheelEvent*> e) {
|
||||||
|
_chatsScroll->viewportEvent(e);
|
||||||
|
}, _topPeers->lifetime());
|
||||||
|
|
||||||
_chatsScroll->setVisible(_tab.current() == Tab::Chats);
|
_chatsScroll->setVisible(_tab.current() == Tab::Chats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,10 @@ int TopPeersStrip::resizeGetHeight(int newWidth) {
|
||||||
return _strip.y() + _strip.height();
|
return _strip.y() + _strip.height();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpl::producer<not_null<QWheelEvent*>> TopPeersStrip::verticalScrollEvents() const {
|
||||||
|
return _verticalScrollEvents.events();
|
||||||
|
}
|
||||||
|
|
||||||
void TopPeersStrip::stripWheelEvent(QWheelEvent *e) {
|
void TopPeersStrip::stripWheelEvent(QWheelEvent *e) {
|
||||||
const auto phase = e->phase();
|
const auto phase = e->phase();
|
||||||
const auto fullDelta = e->pixelDelta().isNull()
|
const auto fullDelta = e->pixelDelta().isNull()
|
||||||
|
|
|
@ -62,6 +62,9 @@ public:
|
||||||
void deselectByKeyboard();
|
void deselectByKeyboard();
|
||||||
bool chooseRow();
|
bool chooseRow();
|
||||||
|
|
||||||
|
[[nodiscard]] auto verticalScrollEvents() const
|
||||||
|
-> rpl::producer<not_null<QWheelEvent*>>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Entry;
|
struct Entry;
|
||||||
struct Layout;
|
struct Layout;
|
||||||
|
|
Loading…
Add table
Reference in a new issue