diff --git a/src/actions/song-info.action.ts b/src/actions/song-info.action.ts index d209eda..083aec8 100644 --- a/src/actions/song-info.action.ts +++ b/src/actions/song-info.action.ts @@ -30,6 +30,7 @@ export class SongInfoAction extends DefaultAction { @SDOnActionEvent('willAppear') public onContextAppear(event: WillAppearEvent): void { + this.reset(); this.socket.onTick$ .pipe(distinctUntilChanged(), takeUntil(this.destroy$)) .subscribe(async (data) => { @@ -99,6 +100,16 @@ export class SongInfoAction extends DefaultAction { ); }); } + reset() { + this.titleIndex = 0; + this.authorIndex = 0; + this.albumIndex = 0; + this.currentTitle = ''; + this.currentAuthor = ''; + this.currentAlbum = ''; + this.currentThumbnail = ''; + this.currentUrl = ''; + } @SDOnActionEvent('willDisappear') public onContextDisappear(event: WillDisappearEvent): void {