From bf5fe404f1078e01404a58cd29bf6041c46a6341 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 16 Apr 2023 17:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E7=BA=BF=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/OnlineList/List.tsx | 6 +----- src/screens/Comment/components/List.tsx | 5 +---- .../Home/Views/SongList/components/Songlist/List.tsx | 6 +----- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/components/OnlineList/List.tsx b/src/components/OnlineList/List.tsx index d030d97..a826847 100644 --- a/src/components/OnlineList/List.tsx +++ b/src/components/OnlineList/List.tsx @@ -165,11 +165,7 @@ const List = forwardRef(({ } const handleLoadMore = () => { - switch (status) { - case 'end': - case 'loading': - case 'refreshing': return - } + if (status != 'idle') return onLoadMore() } diff --git a/src/screens/Comment/components/List.tsx b/src/screens/Comment/components/List.tsx index 828bf75..6095e0a 100644 --- a/src/screens/Comment/components/List.tsx +++ b/src/screens/Comment/components/List.tsx @@ -47,10 +47,7 @@ const List = forwardRef(({ })) const handleLoadMore = () => { - switch (status) { - case 'loading': - case 'refreshing': return - } + if (status != 'idle') return onLoadMore() } diff --git a/src/screens/Home/Views/SongList/components/Songlist/List.tsx b/src/screens/Home/Views/SongList/components/Songlist/List.tsx index 06dc9b2..9416778 100644 --- a/src/screens/Home/Views/SongList/components/Songlist/List.tsx +++ b/src/screens/Home/Views/SongList/components/Songlist/List.tsx @@ -50,11 +50,7 @@ export default forwardRef(({ onRefresh, onLoadMore, onOpenD })) const handleLoadMore = () => { - switch (status) { - case 'end': - case 'loading': - case 'refreshing': return - } + if (status != 'idle') return onLoadMore() }