From 56f78e5265a38b39f0b8bb337f61e73049512748 Mon Sep 17 00:00:00 2001 From: nift4 Date: Sat, 26 Oct 2024 09:22:06 +0200 Subject: [PATCH] ... --- .../akanework/gramophone/logic/GramophonePlaybackService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/akanework/gramophone/logic/GramophonePlaybackService.kt b/app/src/main/kotlin/org/akanework/gramophone/logic/GramophonePlaybackService.kt index d2ee909f6..e8af1ebbd 100644 --- a/app/src/main/kotlin/org/akanework/gramophone/logic/GramophonePlaybackService.kt +++ b/app/src/main/kotlin/org/akanework/gramophone/logic/GramophonePlaybackService.kt @@ -737,11 +737,11 @@ class GramophonePlaybackService : MediaLibraryService(), MediaSessionService.Lis val syncedLyrics = lyrics as SemanticLyrics.SyncedLyrics syncedLyrics.text.indexOfLast { it.lyric.start <= (controller?.currentPosition ?: 0).toULong() - }?.let { if (it == -1) null else -1 } + }.let { if (it == -1) null else it } } else if (lyricsLegacy != null) { lyricsLegacy?.indexOfLast { (it.timeStamp ?: Long.MAX_VALUE) <= (controller?.currentPosition ?: 0) - }?.let { if (it == -1) null else -1 } + }?.let { if (it == -1) null else it } } else null override fun onForegroundServiceStartNotAllowedException() {