mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +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);
|
||||
}, _topPeers->lifetime());
|
||||
|
||||
_topPeers->verticalScrollEvents(
|
||||
) | rpl::start_with_next([=](not_null<QWheelEvent*> e) {
|
||||
_chatsScroll->viewportEvent(e);
|
||||
}, _topPeers->lifetime());
|
||||
|
||||
_chatsScroll->setVisible(_tab.current() == Tab::Chats);
|
||||
}
|
||||
|
||||
|
|
|
@ -205,6 +205,10 @@ int TopPeersStrip::resizeGetHeight(int newWidth) {
|
|||
return _strip.y() + _strip.height();
|
||||
}
|
||||
|
||||
rpl::producer<not_null<QWheelEvent*>> TopPeersStrip::verticalScrollEvents() const {
|
||||
return _verticalScrollEvents.events();
|
||||
}
|
||||
|
||||
void TopPeersStrip::stripWheelEvent(QWheelEvent *e) {
|
||||
const auto phase = e->phase();
|
||||
const auto fullDelta = e->pixelDelta().isNull()
|
||||
|
|
|
@ -62,6 +62,9 @@ public:
|
|||
void deselectByKeyboard();
|
||||
bool chooseRow();
|
||||
|
||||
[[nodiscard]] auto verticalScrollEvents() const
|
||||
-> rpl::producer<not_null<QWheelEvent*>>;
|
||||
|
||||
private:
|
||||
struct Entry;
|
||||
struct Layout;
|
||||
|
|
Loading…
Add table
Reference in a new issue