2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 00:15:42 +00:00

Lock scroll either horizontal or vertical.

This commit is contained in:
John Preston
2023-07-21 21:50:35 +04:00
parent 676a3f8cfa
commit 0b32a0a1ea
3 changed files with 35 additions and 10 deletions

View File

@@ -793,7 +793,10 @@ void Widget::setupMainMenuToggle() {
}
void Widget::setupStories() {
trackScroll(_stories.get());
_stories->verticalScrollEvents(
) | rpl::start_with_next([=](not_null<QWheelEvent*> e) {
_scroll->viewportEvent(e);
}, _stories->lifetime());
_storiesContents.fire(Stories::ContentForSession(
&controller()->session(),