Skip to content

Commit

Permalink
fix:no lyrics when drag progress slider
Browse files Browse the repository at this point in the history
  • Loading branch information
ZTFtrue committed Apr 29, 2024
1 parent a86f9d4 commit 0425bde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/ztftrue/music/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ class MainActivity : ComponentActivity() {
// musicViewModel.musicQueue.value = musicViewModel.musicListMap[playList?.id]
} else if (it.getInt("type") == EVENT_MEDIA_ITEM_Change) {
// before switch to another music, must clear lyrics
musicViewModel.currentCaptionList.clear()
val index = it.getInt("index")
if (index >= 0 && musicViewModel.musicQueue.size > index && index != musicViewModel.currentPlayQueueIndex.intValue) {
musicViewModel.currentCaptionList.clear()
musicViewModel.currentMusicCover.value = null
musicViewModel.currentPlay.value =
musicViewModel.musicQueue[index]
Expand Down

0 comments on commit 0425bde

Please sign in to comment.