Pārlūkot izejas kodu

修复doPlay对isFromSonPlayList为true处理逻辑的bug

onecold 10 mēneši atpakaļ
vecāks
revīzija
229802dd21
1 mainītis faili ar 7 papildinājumiem un 3 dzēšanām
  1. 7 3
      entry/src/main/ets/view/LocalMusic.ets

+ 7 - 3
entry/src/main/ets/view/LocalMusic.ets

@@ -5110,7 +5110,7 @@ export struct LocalMusic {
           this.stop();
         }
 
-        if (isFromSonPlayList||isOpen) { //点击来自右下角的播放列表
+        if (isOpen) {
           this.currentSong = item
           if (index !== undefined) {
             this.curIndex = index
@@ -5118,7 +5118,12 @@ export struct LocalMusic {
           this.songList = []
           this.songList.push(item)
           this.sonDataSource.pushArrayData(this.songList)
-        } else {
+        }else if(isFromSonPlayList){ //点击来自右下角的播放列表
+          this.currentSong = item
+          if (index !== undefined) {
+            this.curIndex = index
+          }
+        }else {
           let globalVideoList = Utility.getGlobalList(this.videoLocalList, CommonConstants.TYPE_LOCAL) as VideoItem[];
           this.curIndex = Utility.getCurIndexFromGlobalList(globalVideoList, item.filePath)
           this.songList = globalVideoList
@@ -5609,7 +5614,6 @@ export struct LocalMusic {
             .height('100%')
             .width(100)
             .layoutWeight(1)
-            .visibility(this.isDarkMode ? Visibility.None : Visibility.Visible)
             .justifyContent(FlexAlign.Center)
             .alignItems(HorizontalAlign.Start)