From 3a5b812a2281db43a11fb16815a011f48520e24c Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Tue, 4 Nov 2025 02:55:44 +0100 Subject: [PATCH] refactor: slow down hero scroll --- lib/screens/discover_screen.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/screens/discover_screen.dart b/lib/screens/discover_screen.dart index 31c15576..f34698b3 100644 --- a/lib/screens/discover_screen.dart +++ b/lib/screens/discover_screen.dart @@ -32,6 +32,8 @@ class DiscoverScreen extends StatefulWidget { class _DiscoverScreenState extends State with Refreshable, ItemUpdatable, SingleTickerProviderStateMixin { + static const Duration _heroAutoScrollDuration = Duration(seconds: 8); + @override PlexClient get client => context.clientSafe; @@ -51,7 +53,7 @@ class _DiscoverScreenState extends State super.initState(); _indicatorAnimationController = AnimationController( vsync: this, - duration: const Duration(seconds: 5), + duration: _heroAutoScrollDuration, ); _loadContent(); _startAutoScroll(); @@ -70,7 +72,7 @@ class _DiscoverScreenState extends State if (_isAutoScrollPaused) return; _indicatorAnimationController.forward(from: 0.0); - _autoScrollTimer = Timer.periodic(const Duration(seconds: 5), (timer) { + _autoScrollTimer = Timer.periodic(_heroAutoScrollDuration, (timer) { if (_onDeck.isEmpty || !_heroController.hasClients || _isAutoScrollPaused) return;