From 194f0e6b59259986b36448c376788c227d490f06 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 13 Jun 2024 16:10:49 +1000 Subject: Scroll to 'top/bottom' by only 10 at a time Prevents a nasty device lockup when scrolling infinite lists --- src/tangara/input/input_touch_wheel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/tangara/input/input_touch_wheel.cpp') diff --git a/src/tangara/input/input_touch_wheel.cpp b/src/tangara/input/input_touch_wheel.cpp index 75159320..ed60dd9b 100644 --- a/src/tangara/input/input_touch_wheel.cpp +++ b/src/tangara/input/input_touch_wheel.cpp @@ -40,9 +40,13 @@ TouchWheel::TouchWheel(drivers::NvsStorage& nvs, drivers::TouchWheel& wheel) return true; }), centre_("centre", actions::select(), {}, {}, {}), - up_("up", {}, {}, actions::scrollToTop(), {}), + up_("up", {}, {}, actions::scrollToTop(), actions::scrollToTop()), right_("right", {}), - down_("down", {}, {}, actions::scrollToBottom(), {}), + down_("down", + {}, + {}, + actions::scrollToBottom(), + actions::scrollToBottom()), left_("left", {}, {}, actions::goBack(), {}), is_scrolling_(false), threshold_(calculateThreshold(nvs.ScrollSensitivity())), -- cgit v1.2.3