fix: 视频详情页评论下拉刷新 issues #486

This commit is contained in:
guozhigq
2024-03-02 15:51:24 +08:00
parent 4191cafe78
commit f81f348a3e
2 changed files with 3 additions and 2 deletions

View File

@ -62,6 +62,7 @@ class VideoReplyController extends GetxController {
noMore.value = ''; noMore.value = '';
} }
if (noMore.value == '没有更多了') { if (noMore.value == '没有更多了') {
isLoadingMore = false;
return; return;
} }
final res = await ReplyHttp.replyList( final res = await ReplyHttp.replyList(

View File

@ -134,13 +134,13 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
super.build(context); super.build(context);
return RefreshIndicator( return RefreshIndicator(
onRefresh: () async { onRefresh: () async {
_videoReplyController.currentPage = 0; return await _videoReplyController.queryReplyList(type: 'init');
return await _videoReplyController.queryReplyList();
}, },
child: Stack( child: Stack(
children: [ children: [
CustomScrollView( CustomScrollView(
controller: scrollController, controller: scrollController,
physics: const AlwaysScrollableScrollPhysics(),
key: const PageStorageKey<String>('评论'), key: const PageStorageKey<String>('评论'),
slivers: <Widget>[ slivers: <Widget>[
SliverPersistentHeader( SliverPersistentHeader(