|
|
@@ -546,6 +546,7 @@ export struct LocalMusic {
|
|
|
case 0:
|
|
|
// 首页模式已在 resetAndLoadFirstPage 中处理
|
|
|
// 切换模式时加载对应的排序类型
|
|
|
+ this.titleName = Utility.resourceToString(this.context,$r('app.string.home'))
|
|
|
this.sortType = this.loadSortTypeForCurrentMode()
|
|
|
break
|
|
|
case 1:
|
|
|
@@ -5207,6 +5208,16 @@ export struct LocalMusic {
|
|
|
centerX: 0,
|
|
|
centerY: 0
|
|
|
})
|
|
|
+ .onReachEnd(() => {
|
|
|
+ // 触底加载下一页
|
|
|
+ Logger.info('heanup LocalMusic', `onReachEnd: hasMore=${this.hasMoreData}, isLoading=${this.isLoadingPage}`);
|
|
|
+ if (this.isCanBack && (this.modeType === 2 || this.modeType === 3)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.hasMoreData && !this.isLoadingPage) {
|
|
|
+ this.loadNextPage();
|
|
|
+ }
|
|
|
+ })
|
|
|
.onAppear(() => {
|
|
|
this.scroller.scrollEdge(Edge.Top)
|
|
|
})
|
|
|
@@ -5613,6 +5624,16 @@ export struct LocalMusic {
|
|
|
.layoutWeight(1)
|
|
|
.scrollBar(BarState.Off)
|
|
|
.supportAnimation(true)
|
|
|
+ .onReachEnd(() => {
|
|
|
+ // 触底加载下一页
|
|
|
+ Logger.info('heanup LocalMusic', `onReachEnd: hasMore=${this.hasMoreData}, isLoading=${this.isLoadingPage}`);
|
|
|
+ if (this.isCanBack && (this.modeType === 2 || this.modeType === 3)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.hasMoreData && !this.isLoadingPage) {
|
|
|
+ this.loadNextPage();
|
|
|
+ }
|
|
|
+ })
|
|
|
.cachedCount(this.twoFingerType==1?5:this.twoFingerType==2?4:3)
|
|
|
.columnsTemplate(
|
|
|
this.twoFingerType == 3 ? 'repeat(auto-fit, 160)' :
|
|
|
@@ -10649,8 +10670,8 @@ export struct LocalMusic {
|
|
|
.layoutWeight(1)
|
|
|
.enabled(this.slideEnable)
|
|
|
.onChange((value: number, mode: SliderChangeMode) => {
|
|
|
- if(this.isSeekTo)
|
|
|
- return
|
|
|
+ if(this.isSeekTo)
|
|
|
+ return
|
|
|
this.isSeekTo = true;
|
|
|
this.mDestroyPage = false;
|
|
|
// 只有播放网盘歌曲时才显示转圈圈
|
|
|
@@ -14581,8 +14602,8 @@ export struct LocalMusic {
|
|
|
}
|
|
|
// 检查常见的流媒体协议
|
|
|
if (str.startsWith('http://') || str.startsWith('https://') ||
|
|
|
- str.startsWith('rtmp://') || str.startsWith('rtsp://') ||
|
|
|
- str.startsWith('rtp://') || str.startsWith('mms://')) {
|
|
|
+ str.startsWith('rtmp://') || str.startsWith('rtsp://') ||
|
|
|
+ str.startsWith('rtp://') || str.startsWith('mms://')) {
|
|
|
return true;
|
|
|
}
|
|
|
|