eslint
This commit is contained in:
@@ -33,12 +33,16 @@ export default () => {
|
||||
return async() => {
|
||||
await Promise.all([
|
||||
initUserApi(), // 自定义API
|
||||
]).catch(err => log.error(err))
|
||||
]).catch(err => {
|
||||
log.error(err)
|
||||
})
|
||||
void music.init() // 初始化音乐sdk
|
||||
unregister = registerAction((ids) => {
|
||||
window.app_event.myListUpdate(ids)
|
||||
})
|
||||
window.lxData.userLists = await getUserLists() // 获取用户列表
|
||||
await initPrevPlayInfo().catch(err => log.error(err)) // 初始化上次的歌曲播放信息
|
||||
await initPrevPlayInfo().catch(err => {
|
||||
log.error(err)
|
||||
}) // 初始化上次的歌曲播放信息
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,10 @@ export default () => {
|
||||
const addDelayNextTimeout = () => {
|
||||
clearDelayNextTimeout()
|
||||
delayNextTimeout = setTimeout(() => {
|
||||
if (window.lx.isPlayedStop) return setAllStatus('')
|
||||
if (window.lx.isPlayedStop) {
|
||||
setAllStatus('')
|
||||
return
|
||||
}
|
||||
void playNext(true)
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
@@ -49,4 +49,6 @@ export const unregisterKeyEvent = () => {
|
||||
keyBind.unbindKey()
|
||||
}
|
||||
|
||||
export const clearDownKeys = () => keyBind.clearDownKeys()
|
||||
export const clearDownKeys = () => {
|
||||
keyBind.clearDownKeys()
|
||||
}
|
||||
|
||||
@@ -22,7 +22,10 @@ export const buildBgUrl = (originUrl: string, dataPath: string): string => {
|
||||
}
|
||||
|
||||
export const getThemes = (callback: (themeInfo: LX.ThemeInfo) => void) => {
|
||||
if (themeInfo.themes.length) return callback(themeInfo)
|
||||
if (themeInfo.themes.length) {
|
||||
callback(themeInfo)
|
||||
return
|
||||
}
|
||||
void getTheme().then(info => {
|
||||
themeInfo.themes = markRaw(info.themes)
|
||||
themeInfo.userThemes = shallowReactive(info.userThemes)
|
||||
|
||||
@@ -21,7 +21,7 @@ export const onSettingChanged = (listener: LX.IpcRendererEventListenerParams<Par
|
||||
}
|
||||
|
||||
export const sendInited = () => {
|
||||
return rendererSend(WIN_MAIN_RENDERER_EVENT_NAME.inited)
|
||||
rendererSend(WIN_MAIN_RENDERER_EVENT_NAME.inited)
|
||||
}
|
||||
|
||||
export const getOtherSource = async(id: string): Promise<LX.Music.MusicInfoOnline[]> => {
|
||||
|
||||
@@ -52,7 +52,9 @@ export default () => {
|
||||
case 'playListPart_v2':
|
||||
listData = configData.data
|
||||
break
|
||||
default: return showImportTip(configData.type)
|
||||
default:
|
||||
showImportTip(configData.type)
|
||||
return
|
||||
}
|
||||
|
||||
const targetList = [defaultList, loveList, ...userLists].find(l => l.id == listData.id)
|
||||
|
||||
Reference in New Issue
Block a user