Преглед на файлове

修复计时器bug和获取头像bug

onecold преди 1 година
родител
ревизия
a3c99995d7
променени са 2 файла, в които са добавени 13 реда и са изтрити 9 реда
  1. 1 1
      entry/src/main/ets/pages/SettingPage.ets
  2. 12 8
      entry/src/main/ets/view/LocalMusic.ets

+ 1 - 1
entry/src/main/ets/pages/SettingPage.ets

@@ -687,7 +687,7 @@ export struct SettingPage {
             }
             .height(55)
             .clickEffect({ level: ClickEffectLevel.HEAVY })
-
+            Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
             // 封面方形
             Row() {
               Text('封面方形')

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

@@ -927,8 +927,8 @@ export struct LocalMusic {
 
       if (ArrayUtil.isNotEmpty(files)) {
         if(this.currentPath !=this.rootPath){
-          if(cachedValue)
-            this.currentTitleCover = Utility.getFirstCoverFromList(cachedValue)
+          if(files)
+            this.currentTitleCover = Utility.getFirstCoverFromList(files)
         }
         // 缓存结果
         this.addCache(curPath, this.videoLocalList);
@@ -3347,8 +3347,8 @@ export struct LocalMusic {
     .transition(TransitionEffect.move(TransitionEdge.BOTTOM)
       .animation({ duration: 500, curve: Curve.Ease }))
     // .margin({ bottom: this.isCoverOpacity() ? 80 : 175 })
-    .margin({ bottom: this.isCoverOpacity() ? (this.isShowCoverHeader()? 40:80)
-      :(this.isShowCoverHeader()? 90:175) })
+    .margin({ bottom: this.isCoverOpacity() ? (this.isShowCoverHeader()? 45:80)
+      :(this.isShowCoverHeader()? 95:175) })
     .layoutWeight(1)
     .scrollBar(BarState.Off)
     .supportAnimation(true)
@@ -3440,7 +3440,12 @@ export struct LocalMusic {
             })
             .draggable(false)
             .opacity(this.opacityItem)// 绑定透明度
-            .animation({ curve: Curve.Sharp, duration: 300 })
+            // .transition(TransitionEffect.move(TransitionEdge.BOTTOM)
+            //   .animation({ duration: 500, curve: Curve.Ease }))
+            .animation({
+              duration: 666,
+              curve: 'ease-in-out' // 可选动画曲线
+            })
             .margin({ left: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20 ,
               right: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20})
           Column() {
@@ -3886,8 +3891,8 @@ export struct LocalMusic {
 
       }))
     // .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
-    .margin({ bottom: this.isCoverOpacity() ? (this.isShowCoverHeader()? 20:80)
-      :(this.isShowCoverHeader()? 70:166) })
+    .margin({ bottom: this.isCoverOpacity() ? (this.isShowCoverHeader()? 25:80)
+      :(this.isShowCoverHeader()? 75:166) })
     .cachedCount(6)
     .borderRadius(20)
     .transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 1.2, y: 1.2 }).animation({ duration: 500 }),
@@ -9793,7 +9798,6 @@ export struct LocalMusic {
       ToastUtil.showToast('wma格式不支持拖动快进。')
       return
     }
-    this.stopProgressTask();
 
     this.mIjkMediaPlayer.seekTo(value);
     // this.startPlayOrResumePlay()