From 162a83339c85921cf64ec738c88c280c903a2ee5 Mon Sep 17 00:00:00 2001 From: lost Date: Sat, 10 Dec 2022 14:10:46 -0800 Subject: [PATCH] switch lyrics when the track changes implements https://github.com/naman14/Timber/issues/476 --- .../java/com/naman14/timber/subfragments/LyricsFragment.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/com/naman14/timber/subfragments/LyricsFragment.java b/app/src/main/java/com/naman14/timber/subfragments/LyricsFragment.java index 63db3a10..cfc8426a 100644 --- a/app/src/main/java/com/naman14/timber/subfragments/LyricsFragment.java +++ b/app/src/main/java/com/naman14/timber/subfragments/LyricsFragment.java @@ -63,6 +63,10 @@ public void run() { long position = MusicPlayer.position(); if (LyricsFragment.this.isResumed()) { + long newAudioId = MusicPlayer.getCurrentAudioId(); + if (newAudioId != audioId) { + loadLyrics(); + } if (syncLyricsView.getVisibility() == View.VISIBLE) { syncLyricsView.updateTime(position); }