Browse Source

fix(LocalMusic): 修复收藏列表数据更新问题

- 在收藏列表更新时添加强制刷新参数
- 确保我的收藏页面数据正确同步
- 解决收藏音乐列表显示不一致的问题
chendeben 7 months ago
parent
commit
c22d9bb5f6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      entry/src/main/ets/view/LocalMusic.ets

+ 2 - 2
entry/src/main/ets/view/LocalMusic.ets

@@ -1741,7 +1741,7 @@ export struct LocalMusic {
       this.favList = result
       if (isFavRefresh || this.isFavMusic) { //如果是我的收藏,更新我的收藏数据
         this.videoLocalList = this.favList
-        this.updateListData(this.videoLocalList)
+        this.updateListData(this.videoLocalList, true)
       }
     })
   }
@@ -6389,7 +6389,7 @@ export struct LocalMusic {
           this.currentTitleName = '我的收藏'
           this.currentTitleCover = $r('app.media.alt')
           //加载动画效果
-          this.updateListData(this.favList)
+          this.updateListData(this.favList, true)
           if (ArrayUtil.isEmpty(this.favList)) {
             ToastUtil.showToast('无音乐收藏记录')
           } else {