Bläddra i källkod

修复AB循环不设置点击直接报错
修复点击右下角播放列表大数据也可以滚动

onecold 10 månader sedan
förälder
incheckning
ae435b974b
1 ändrade filer med 10 tillägg och 4 borttagningar
  1. 10 4
      entry/src/main/ets/view/LocalMusic.ets

+ 10 - 4
entry/src/main/ets/view/LocalMusic.ets

@@ -5622,13 +5622,15 @@ export struct LocalMusic {
   }
 
   scrollIndex(){
-    if(this.curIndex>500)//条数太大的时候 滚动非常卡 导致闪退,先改为不滚
-     return
     try {
       setTimeout(() => {
         this.getUIContext()?.animateTo({ duration: 555 }, () => {
-          this.playListScroller.scrollToIndex(this.curIndex,true, ScrollAlign.CENTER)
-          // this.playListScroller.scrollToIndex(1000,true, ScrollAlign.CENTER)
+          if(this.curIndex>60){
+            this.playListScroller.scrollToIndex(this.curIndex,false, ScrollAlign.CENTER)
+          }else{
+            this.playListScroller.scrollToIndex(this.curIndex,true, ScrollAlign.CENTER)
+          }
+
         })
       }, 123)
     }catch (error) {
@@ -10807,6 +10809,10 @@ export struct LocalMusic {
         this.isABSheet = false
       },
       onStartButtonClick: async ()=>{
+        if(this.jumpBTime<=this.jumpATime||stringForTime(this.jumpATime)==stringForTime(this.jumpBTime)){
+          ToastUtil.showToast('设置B点时间不能小于或等于A点时间')
+          return
+        }
         this.isABSheet = false
         this.startABLoop()
       },