Sfoglia il codice sorgente

网盘返回逻辑的修改

onecold 5 mesi fa
parent
commit
2e82f1352d

+ 16 - 5
entry/src/main/ets/pages/NewIndex.ets

@@ -197,11 +197,22 @@ struct NewIndex {
       console.info('onecold 返回键处理逻辑:发送音频广播通知更新列表');
       const eventData: emitter.EventData = {};
       emitter.emit({ eventId: EventConstants.EVENT_SWIPE_BACK_UPDATE }, eventData); // 发送音频广播通知更新doSwipBack
-    } else if(this.mType === 7&&this.isDetailView) {
-      // RemoteMusicPage(流媒体) 页面,发送手势返回事件
-      console.info('onecold RemoteMusicPage 返回键处理:发送手势返回事件');
-      const eventData: emitter.EventData = {};
-      emitter.emit({ eventId: EventConstants.EVENT_SWIPE_BACK_NAVID}, eventData);
+    } else if(this.mType === 7) {
+      if(this.isDetailView){
+        console.info('onecold RemoteMusicPage 返回键处理:发送手势返回事件');
+        const eventData: emitter.EventData = {};
+        emitter.emit({ eventId: EventConstants.EVENT_SWIPE_BACK_NAVID}, eventData);
+      }else{
+        if (this.isShowDrawer) {
+          // 如果抽屉菜单打开,先关闭抽屉
+          this.getUIContext()?.animateTo({ duration: 555 }, () => {
+            this.isShowDrawer = false
+          })
+        } else {
+          return false
+        }
+      }
+
     } else if(this.mType === 6) {
       console.info('onecold 网盘 返回键处理:发送手势返回事件');
       const eventData: emitter.EventData = {};

+ 2 - 2
lib/src/main/ets/view/LyricView2.ets

@@ -350,7 +350,7 @@ export struct LyricView2 {
         // 只对当前播放行且包含逐字数据的行应用卡拉OK效果
         if (index !== this.currentIndex  || item.words.length === 0) {
             //console.info('heanup', `getLyricItemLinearGradient - 非高亮行或无逐字数据: index=${index}, currentIndex=${this.currentIndex}, hasWords=${item.hasWords()}, wordsCount=${item.words.length}`)
-            return [[Color.Transparent, 0.0], [Color.Transparent, 1.0]]
+            return [[Color.White, 0.0], [Color.White, 1.0]]
         }
 
         // 计算该行歌词的总时长
@@ -394,7 +394,7 @@ export struct LyricView2 {
         // 非高亮行或无效数据,返回透明
         if (index !== this.currentIndex || !word || !word.word) {
             //console.info('heanup', `getWordByWordLyricLyricItemLinearGradient - 非高亮行或无效word: index=${index}, currentIndex=${this.currentIndex}`)
-            return [[Color.Transparent, 0.0], [Color.Transparent, 1.0]]
+            return [[Color.White, 0.0], [Color.White, 1.0]]
         }
 
         // 计算该字的播放进度