fix: 视频详情页评论重复请求
This commit is contained in:
@ -53,6 +53,9 @@ class VideoReplyController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future queryReplyList({type = 'init'}) async {
|
Future queryReplyList({type = 'init'}) async {
|
||||||
|
if (isLoadingMore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
isLoadingMore = true;
|
isLoadingMore = true;
|
||||||
if (type == 'init') {
|
if (type == 'init') {
|
||||||
currentPage = 0;
|
currentPage = 0;
|
||||||
|
|||||||
@ -75,7 +75,8 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
() {
|
() {
|
||||||
if (scrollController.position.pixels >=
|
if (scrollController.position.pixels >=
|
||||||
scrollController.position.maxScrollExtent - 300) {
|
scrollController.position.maxScrollExtent - 300) {
|
||||||
EasyThrottle.throttle('replylist', const Duration(seconds: 2), () {
|
EasyThrottle.throttle('replylist', const Duration(milliseconds: 200),
|
||||||
|
() {
|
||||||
_videoReplyController.onLoad();
|
_videoReplyController.onLoad();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user