diff --git a/lib/pages/video/detail/introduction/widgets/fav_panel.dart b/lib/pages/video/detail/introduction/widgets/fav_panel.dart index 5c3454b7..18928f48 100644 --- a/lib/pages/video/detail/introduction/widgets/fav_panel.dart +++ b/lib/pages/video/detail/introduction/widgets/fav_panel.dart @@ -15,11 +15,13 @@ class FavPanel extends StatefulWidget { class _FavPanelState extends State { Box localCache = GStrorage.localCache; late double sheetHeight; + late Future _futureBuilderFuture; @override void initState() { super.initState(); sheetHeight = localCache.get('sheetHeight'); + _futureBuilderFuture = widget.ctr!.queryVideoInFolder(); } @override @@ -52,7 +54,7 @@ class _FavPanelState extends State { Expanded( child: Material( child: FutureBuilder( - future: widget.ctr!.queryVideoInFolder(), + future: _futureBuilderFuture, builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.done) { Map data = snapshot.data as Map; diff --git a/lib/pages/video/detail/replyReply/view.dart b/lib/pages/video/detail/replyReply/view.dart index b0ce293c..d0e9a60f 100644 --- a/lib/pages/video/detail/replyReply/view.dart +++ b/lib/pages/video/detail/replyReply/view.dart @@ -37,6 +37,7 @@ class _VideoReplyReplyPanelState extends State { late AnimationController replyAnimationCtl; Box localCache = GStrorage.localCache; late double sheetHeight; + Future? _futureBuilderFuture; @override void initState() { @@ -61,6 +62,7 @@ class _VideoReplyReplyPanelState extends State { ); sheetHeight = localCache.get('sheetHeight'); + _futureBuilderFuture = _videoReplyReplyController.queryReplyList(); } @override @@ -134,7 +136,7 @@ class _VideoReplyReplyPanelState extends State { ), ], FutureBuilder( - future: _videoReplyReplyController.queryReplyList(), + future: _futureBuilderFuture, builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.done) { Map data = snapshot.data as Map;