From 0425bded4730fab14b77bbee153f64ea28d00ae0 Mon Sep 17 00:00:00 2001 From: ztftrue Date: Mon, 29 Apr 2024 22:38:34 +0800 Subject: [PATCH] fix:no lyrics when drag progress slider --- app/src/main/java/com/ztftrue/music/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/ztftrue/music/MainActivity.kt b/app/src/main/java/com/ztftrue/music/MainActivity.kt index ddf735f..ff2159a 100644 --- a/app/src/main/java/com/ztftrue/music/MainActivity.kt +++ b/app/src/main/java/com/ztftrue/music/MainActivity.kt @@ -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]