|
|
@@ -852,9 +852,7 @@ export struct LocalMusic {
|
|
|
// this.videoLocalList = cachedValue;
|
|
|
Logger.info('onecold 有缓存 cachedValue = ' + cachedValue)
|
|
|
if(this.currentPath !=this.rootPath){//第一个封面赋值给currentTitleCover
|
|
|
- if(cachedValue[0].pixelMapPath){
|
|
|
- this.currentTitleCover = cachedValue[0].pixelMapPath
|
|
|
- }
|
|
|
+ this.currentTitleCover = Utility.getFirstCoverFromList(cachedValue)
|
|
|
}
|
|
|
this.updateListData(cachedValue)
|
|
|
}
|
|
|
@@ -927,9 +925,8 @@ export struct LocalMusic {
|
|
|
|
|
|
if (ArrayUtil.isNotEmpty(files)) {
|
|
|
if(this.currentPath !=this.rootPath){
|
|
|
- if(files[0].pixelMapPath){
|
|
|
- this.currentTitleCover = files[0].pixelMapPath//第一个封面赋值给currentTitleCover
|
|
|
- }
|
|
|
+ if(cachedValue)
|
|
|
+ this.currentTitleCover = Utility.getFirstCoverFromList(cachedValue)
|
|
|
}
|
|
|
// 缓存结果
|
|
|
this.addCache(curPath, this.videoLocalList);
|
|
|
@@ -2799,8 +2796,10 @@ export struct LocalMusic {
|
|
|
.padding({top:this.topRectHeight ,bottom:this.bottomBarHeight+48 })
|
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
+ // .transition({ type: TransitionType.Insert, translate: { x: -DisplayUtil.getWidth(), y: 0 } })
|
|
|
+ // .transition({ type: TransitionType.Delete, translate: { x: -DisplayUtil.getWidth(), y: 0 } })
|
|
|
// .transition(TransitionEffect.scale({ x: 1.2, y: 1.2 }).animation({ duration: 500 }))
|
|
|
- .transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 1.2, y: 1.2 }).animation({ duration: 500 }),
|
|
|
+ .transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 0.7, y: 0.7}).animation({ duration: 500 }),
|
|
|
TransitionEffect.scale({ x: 0, y: 0 }) ))
|
|
|
.clickEffect({level:ClickEffectLevel.LIGHT})
|
|
|
// .animation({
|
|
|
@@ -4046,6 +4045,8 @@ export struct LocalMusic {
|
|
|
|
|
|
if (ArrayUtil.isEmpty(this.historyList)) {
|
|
|
ToastUtil.showToast('最近播放记录空空如也')
|
|
|
+ }else{
|
|
|
+ this.currentTitleCover = Utility.getFirstCoverFromList(this.historyList)
|
|
|
}
|
|
|
this.isHistory = true
|
|
|
this.titleBarModel.setLeftIconMain($r('app.media.left_back_white'))
|
|
|
@@ -4057,6 +4058,8 @@ export struct LocalMusic {
|
|
|
this.updateListData(this.favList)
|
|
|
if(ArrayUtil.isEmpty(this.favList)){
|
|
|
ToastUtil.showToast('无音乐收藏记录')
|
|
|
+ }else{
|
|
|
+ this.currentTitleCover = Utility.getFirstCoverFromList(this.favList)
|
|
|
}
|
|
|
this.isFavMusic = true
|
|
|
this.titleBarModel.setLeftIconMain($r('app.media.left_back_white'))
|