Skip to content

Commit

Permalink
renderer: set document title after track switch
Browse files Browse the repository at this point in the history
  • Loading branch information
rocka committed Nov 4, 2021
1 parent f21a9c7 commit 23a62e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/renderer/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,13 @@ export async function updateUiCoverImgSrc({ commit, getters }) {
export async function updateUiLyric({ commit, getters }, { ignoreCache = false } = {}) {
const track = getters.playing;
if (track && track.id) {
document.title = `${track.name} | Electron NCM`;
commit(types.SET_LYRIC_LOADING, true);
const lyric = await ApiTyped.getMusicLyric(track.id, ignoreCache);
commit(types.SET_ACTIVE_LYRIC, lyric);
commit(types.SET_LYRIC_LOADING, false);
} else {
document.title = 'Electron NCM';
commit(types.SET_ACTIVE_LYRIC, {});
}
}
Expand Down

0 comments on commit 23a62e1

Please sign in to comment.