SongSelect: compare id before clearing currentSongCache

Add id check to currentSongCache clearing.
Fixes subtitle rendering if title matches but not the same song.
Titles are not guaranteed to be unique, but ids are.
Title check is still here for tiles that are not songs.
This commit is contained in:
xdavidwu 2019-01-21 20:10:22 +08:00
parent e089e86240
commit 65f8e9018a

View File

@ -1089,7 +1089,8 @@ class SongSelect{
highlight = 0 highlight = 0
} }
if(this.currentSongTitle !== currentSong.title){ if(this.currentSongId !== currentSong.id || this.currentSongTitle !== currentSong.title){
this.currentSongId = currentSong.id
this.currentSongTitle = currentSong.title this.currentSongTitle = currentSong.title
this.currentSongCache.clear() this.currentSongCache.clear()
} }