Bladeren bron

修复分页加载onReachEnd 歌单是不能加载下一页的

onecold 7 maanden geleden
bovenliggende
commit
abbb075196
1 gewijzigde bestanden met toevoegingen van 8 en 0 verwijderingen
  1. 8 0
      entry/src/main/ets/view/LocalMusic.ets

+ 8 - 0
entry/src/main/ets/view/LocalMusic.ets

@@ -5215,6 +5215,8 @@ export struct LocalMusic {
           centerY: 0
         })
         .onReachEnd(() => {
+          if(this.modeType === 4 )
+            return;
           // 触底加载下一页
           Logger.info('heanup LocalMusic', `onReachEnd: hasMore=${this.hasMoreData}, isLoading=${this.isLoadingPage}`);
           if (this.isCanBack && (this.modeType === 2 || this.modeType === 3)) {
@@ -5631,6 +5633,8 @@ export struct LocalMusic {
     .scrollBar(BarState.Off)
     .supportAnimation(true)
     .onReachEnd(() => {
+      if(this.modeType === 4 )
+        return;
       // 触底加载下一页
       Logger.info('heanup LocalMusic', `onReachEnd: hasMore=${this.hasMoreData}, isLoading=${this.isLoadingPage}`);
       if (this.isCanBack && (this.modeType === 2 || this.modeType === 3)) {
@@ -6427,6 +6431,8 @@ export struct LocalMusic {
       this.hideAlphabetIndexAfterDelay(1500)
     })
     .onReachEnd(() => {
+      if(this.modeType === 4 )
+        return;
       // 触底加载下一页
       Logger.info('heanup LocalMusic', `onReachEnd: hasMore=${this.hasMoreData}, isLoading=${this.isLoadingPage}`);
       if (this.isCanBack && (this.modeType === 2 || this.modeType === 3)) {
@@ -9166,6 +9172,8 @@ export struct LocalMusic {
     .width('100%')
     .height('100%')
     .onReachEnd(() => {
+      if(this.modeType === 4 )
+        return;
       void this.tryLoadNextPageForPlayback();
     })
     // .transition(TransitionEffect.move(TransitionEdge.BOTTOM)