|
@@ -1103,6 +1103,13 @@ export struct LocalMusic {
|
|
|
this.syncWebdavQueueWithoutRestart();
|
|
this.syncWebdavQueueWithoutRestart();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ let eventOpenLocalSpecialList: emitter.InnerEvent = { eventId: EventConstants.EVENT_OPEN_LOCAL_SPECIAL_LIST }
|
|
|
|
|
+ emitter.on(eventOpenLocalSpecialList, (eventData: emitter.EventData) => {
|
|
|
|
|
+ const data = eventData.data as Record<string, Object>
|
|
|
|
|
+ const target = data?.target as string
|
|
|
|
|
+ this.openSpecialLocalList(target)
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
let eventSetting: emitter.InnerEvent = { eventId: EventConstants.EVENT_SETTING_UPDATE }
|
|
let eventSetting: emitter.InnerEvent = { eventId: EventConstants.EVENT_SETTING_UPDATE }
|
|
|
// 监听广播事件(通用设置配置更新)
|
|
// 监听广播事件(通用设置配置更新)
|
|
|
emitter.on(eventSetting, (eventData: emitter.EventData) => {
|
|
emitter.on(eventSetting, (eventData: emitter.EventData) => {
|
|
@@ -9305,6 +9312,37 @@ export struct LocalMusic {
|
|
|
return Utility.getGlobalList(this.videoLocalList, CommonConstants.TYPE_LOCAL);
|
|
return Utility.getGlobalList(this.videoLocalList, CommonConstants.TYPE_LOCAL);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private openSpecialLocalList(target: string): void {
|
|
|
|
|
+ this.mType = 0
|
|
|
|
|
+ this.isShowDrawer = false
|
|
|
|
|
+ this.offsetX = 0
|
|
|
|
|
+ this.isHistory = false
|
|
|
|
|
+ this.isFavMusic = false
|
|
|
|
|
+
|
|
|
|
|
+ if (target === 'recent') {
|
|
|
|
|
+ this.titleName = '最近播放'
|
|
|
|
|
+ this.currentTitleName = '最近播放'
|
|
|
|
|
+ this.currentTitleCover = $r('app.media.alt')
|
|
|
|
|
+ this.updateListData(this.historyList, true)
|
|
|
|
|
+ if (ArrayUtil.isNotEmpty(this.historyList)) {
|
|
|
|
|
+ this.currentTitleCover = Utility.getFirstCoverFromList(this.historyList)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isHistory = true
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (target === 'favorite') {
|
|
|
|
|
+ this.titleName = '我的收藏'
|
|
|
|
|
+ this.currentTitleName = '我的收藏'
|
|
|
|
|
+ this.currentTitleCover = $r('app.media.alt')
|
|
|
|
|
+ this.updateListData(this.favList, true)
|
|
|
|
|
+ if (ArrayUtil.isNotEmpty(this.favList)) {
|
|
|
|
|
+ this.currentTitleCover = Utility.getFirstCoverFromList(this.favList)
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isFavMusic = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private async tryLoadNextPageForPlayback(): Promise<void> {
|
|
private async tryLoadNextPageForPlayback(): Promise<void> {
|
|
|
if (this.playQueueScope !== 'view') {
|
|
if (this.playQueueScope !== 'view') {
|
|
|
return;
|
|
return;
|