|
|
@@ -1135,6 +1135,7 @@ export struct LocalMusic {
|
|
|
this.enablePointLight = PreferencesUtil.getBooleanSync('enablePointLight', true)
|
|
|
AppStorage.setOrCreate('EnablePointLight', this.enablePointLight);
|
|
|
this.showSimple = PreferencesUtil.getBooleanSync('showSimple', true)
|
|
|
+ this.showFindLocation = PreferencesUtil.getBooleanSync('showFindLocation', true)
|
|
|
this.showZMIndex = PreferencesUtil.getBooleanSync('showZMIndex', false)
|
|
|
this.autoHideTitle = PreferencesUtil.getBooleanSync('autoHideTitle', true)
|
|
|
this.isShowPrecious = PreferencesUtil.getBooleanSync('isShowPrecious', false)
|
|
|
@@ -3380,13 +3381,12 @@ export struct LocalMusic {
|
|
|
|
|
|
PointLightDefaultButton({
|
|
|
isSysBol:true,
|
|
|
- pointColor:Color.Black,
|
|
|
+ pointColor:Color.Gray,
|
|
|
imageResource:$r('sys.symbol.local_fill'),
|
|
|
isPx: false,
|
|
|
builderHeight: 30,
|
|
|
builderWidth: 30,
|
|
|
})
|
|
|
- // ListLocateButton()
|
|
|
.onClick(() =>{
|
|
|
void this.locateCurrentSong();
|
|
|
})
|
|
|
@@ -3398,8 +3398,9 @@ export struct LocalMusic {
|
|
|
|
|
|
}
|
|
|
.padding({
|
|
|
- bottom: 0,right:5
|
|
|
+ bottom: 0
|
|
|
})
|
|
|
+ .margin({right:5})
|
|
|
.position({x:'92%'})
|
|
|
.height('100%')
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
@@ -7052,14 +7053,25 @@ export struct LocalMusic {
|
|
|
|
|
|
}
|
|
|
|
|
|
- scrollIndexMain(){
|
|
|
+ scrollIndexMain(dialogId?:string){
|
|
|
try {
|
|
|
setTimeout(() => {
|
|
|
this.getUIContext()?.animateTo({ duration: 555 }, () => {
|
|
|
- if(this.curIndex>60){
|
|
|
- this.listScroller.scrollToIndex(this.curIndex,false, ScrollAlign.CENTER)
|
|
|
+ console.info('heanup scrollIndexMain this.curIndex='+this.curIndex)
|
|
|
+ if(dialogId)
|
|
|
+ DialogHelper.closeDialog(dialogId)
|
|
|
+ let isAni:boolean = false
|
|
|
+ if(this.curIndex<50){
|
|
|
+ isAni = true
|
|
|
+ }
|
|
|
+ if(this.twoFingerType==4){
|
|
|
+ this.waterScroller.scrollToIndex(this.curIndex,isAni, ScrollAlign.CENTER)
|
|
|
}else{
|
|
|
- this.listScroller.scrollToIndex(this.curIndex,true, ScrollAlign.CENTER)
|
|
|
+ if(this.isGridMusic){
|
|
|
+ this.scroller.scrollToIndex(this.curIndex,isAni, ScrollAlign.CENTER)
|
|
|
+ }else{
|
|
|
+ this.listScroller.scrollToIndex(this.curIndex,isAni, ScrollAlign.CENTER)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
})
|
|
|
@@ -7084,13 +7096,16 @@ export struct LocalMusic {
|
|
|
// 歌曲在当前列表中,直接滚动
|
|
|
console.info("heanup locateCurrentSong: 找到歌曲,索引=" + targetIndex);
|
|
|
this.curIndex = targetIndex;
|
|
|
+ this.scrollIndexMain();
|
|
|
} else {
|
|
|
// 歌曲不在当前列表中,加载当前歌曲再第几页完整列表后再定位
|
|
|
console.info("heanup locateCurrentSong: 歌曲不在当前列表,开始加载完整列表");
|
|
|
+ const dialogID = DialogHelper.showLoadingDialog()
|
|
|
await this.hydrateFullMediaPlayListIfNeeded(false);
|
|
|
-
|
|
|
+ this.curIndex = Utility.getIndexFromList(this.videoLocalList, this.currentSong.filePath);
|
|
|
+ this.scrollIndexMain(dialogID);
|
|
|
}
|
|
|
- this.scrollIndexMain();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//播放列表布局
|