فهرست منبع

DetailedPage: rebuild on actual change of shouldDisableScroll value

Neeraj Gupta 3 سال پیش
والد
کامیت
a8e9c9d6d5
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      lib/ui/detail_page.dart

+ 5 - 3
lib/ui/detail_page.dart

@@ -141,9 +141,11 @@ class _DetailPageState extends State<DetailPage> {
           autoPlay: !_hasPageChanged,
           tagPrefix: widget.config.tagPrefix,
           shouldDisableScroll: (value) {
-            setState(() {
-              _shouldDisableScroll = value;
-            });
+            if (_shouldDisableScroll != value) {
+              setState(() {
+                _shouldDisableScroll = value;
+              });
+            }
           },
           playbackCallback: (isPlaying) {
             _shouldHideAppBar = isPlaying;