diff --git a/core/lib/presentation/views/pull_to_refresh/pull_to_refresh_widget.dart b/core/lib/presentation/views/pull_to_refresh/pull_to_refresh_widget.dart index 1cf7fe032..b3125e2f0 100644 --- a/core/lib/presentation/views/pull_to_refresh/pull_to_refresh_widget.dart +++ b/core/lib/presentation/views/pull_to_refresh/pull_to_refresh_widget.dart @@ -53,9 +53,18 @@ class _PullToRefreshWidgetState extends State { return NotificationListener( onNotification: (notification) { if (notification is ScrollUpdateNotification) { - setState(() { - _scrollOffset = notification.metrics.pixels; - }); + final newOffset = notification.metrics.pixels; + final crossedThreshold = + (_scrollOffset.abs() <= widget.deepRefreshThreshold && + newOffset.abs() > widget.deepRefreshThreshold) || + (_scrollOffset.abs() > widget.deepRefreshThreshold && + newOffset.abs() <= widget.deepRefreshThreshold); + + if (crossedThreshold || _scrollOffset != newOffset) { + setState(() { + _scrollOffset = newOffset; + }); + } } return false; },