Ver código fonte

提交最新代码

onecold 4 meses atrás
pai
commit
34db9ebb65

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

@@ -444,11 +444,11 @@ struct NewIndex {
       this.loadPlaylistList()
     });
 
-    if(Utility.isOpenTime()&&!PreferencesUtil.getBooleanSync('isShowHaoPingDialog17', false)){
+    if(Utility.isOpenTime()&&!PreferencesUtil.getBooleanSync('isShowHaoPingDialog18', false)){
       setTimeout(()=>{
         Utility.showHaoPingDialog(this.getUIContext(),this.context,this.appName,this.bundleName)
-        PreferencesUtil.putSync('isShowHaoPingDialog17', true)
-      },25000)
+        PreferencesUtil.putSync('isShowHaoPingDialog18', true)
+      },50000)
     }
     this.initDefalutType()
   }
@@ -543,6 +543,7 @@ struct NewIndex {
   }
 
   private applyDefaultHomeState(): void {
+    this.mType = 0
     this.defalut_home_type = PreferencesUtil.getNumberSync('defalut_home_type', 0)
     const configuredAccount = this.getConfiguredHomeAccount()
 
@@ -550,7 +551,7 @@ struct NewIndex {
     this.currentSongListName = ''
     this.modeType = 0
     this.tabSelectedIndexes = [0]
-    this.mType = 0
+
 
     if(this.defalut_home_type==1){
       this.mType = 0

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

@@ -20910,6 +20910,7 @@ export struct LocalMusic {
           if (isJump) {
             this.setShowPlayTrue()
           }
+          // 只有“随心所欲分页随机”才读取分页元数据,其他发现页队列仍按原有歌单模式处理。
           const findMeta = isFindLocalRandomPagedPlaylist(playlistId) && findPlaylistMeta.isPagedLocalQueue
             ? findPlaylistMeta
             : undefined;
@@ -21012,6 +21013,7 @@ export struct LocalMusic {
 
     const actualTotal = totalCount ?? songs.length;
     if (isFindPagedLocalQueue) {
+      // 这类队列只保存当前页歌曲,总数和分页游标放到独立状态里继续滚动加载。
       this.applyFindPagedLocalQueueState(findMeta, actualTotal);
       this.currentPlaylistSongFilePaths = [];
     } else {
@@ -21044,6 +21046,7 @@ export struct LocalMusic {
       // 确保当前播放的歌曲也更新到存储
       AppStorage.setOrCreate('currentSong', songs[startIndex])
       if (isFindPagedLocalQueue) {
+        // 不要把发现页分页随机队列降级成普通歌单,否则后面又会触发全量 hydrate。
         this.preserveExistingQueueOnNextPlay = true
         this.nextPlayQueueScope = 'find_paged_local'
         this.doPlay(songs[startIndex], startIndex, false)