fix: 视频详情页评论重复请求

This commit is contained in:
guozhigq
2024-02-10 19:57:10 +08:00
parent 4a5f4ca2ca
commit 3d5ebe7e99
2 changed files with 5 additions and 1 deletions

View File

@ -53,6 +53,9 @@ class VideoReplyController extends GetxController {
}
Future queryReplyList({type = 'init'}) async {
if (isLoadingMore) {
return;
}
isLoadingMore = true;
if (type == 'init') {
currentPage = 0;

View File

@ -75,7 +75,8 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
() {
if (scrollController.position.pixels >=
scrollController.position.maxScrollExtent - 300) {
EasyThrottle.throttle('replylist', const Duration(seconds: 2), () {
EasyThrottle.throttle('replylist', const Duration(milliseconds: 200),
() {
_videoReplyController.onLoad();
});
}