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 4763c0654..250b409b9 100644 --- a/app/src/main/kotlin/org/akanework/gramophone/logic/GramophonePlaybackService.kt +++ b/app/src/main/kotlin/org/akanework/gramophone/logic/GramophonePlaybackService.kt @@ -94,7 +94,6 @@ import org.akanework.gramophone.logic.utils.LrcUtils.loadAndParseLyricsFile import org.akanework.gramophone.logic.utils.LrcUtils.loadAndParseLyricsFileLegacy import org.akanework.gramophone.logic.utils.MediaStoreUtils import org.akanework.gramophone.logic.utils.SemanticLyrics -import org.akanework.gramophone.logic.utils.convertForLegacy import org.akanework.gramophone.logic.utils.exoplayer.EndedWorkaroundPlayer import org.akanework.gramophone.logic.utils.exoplayer.GramophoneMediaSourceFactory import org.akanework.gramophone.logic.utils.exoplayer.GramophoneRenderFactory @@ -796,8 +795,8 @@ class GramophonePlaybackService : MediaLibraryService(), MediaSessionService.Lis fun updateLyrics(parsedLyrics: MutableList?, parsedLyricsa: SemanticLyrics?) { if ( parsedLyrics.toString() == "null" ){ - lyrics = parsedLyricsa - adapter?.updateLyrics(lyrics.convertForLegacy()) + lyricsLegacy = SemanticLyrics.convertForLegacy(parsedLyricsa) + adapter?.updateLyrics(lyricsLegacy) newView?.updateLyrics(null) } else { lyricsLegacy = parsedLyrics diff --git a/app/src/main/kotlin/org/akanework/gramophone/ui/fragments/settings/ExperimentalSettingsTopFragment.kt b/app/src/main/kotlin/org/akanework/gramophone/ui/fragments/settings/ExperimentalSettingsTopFragment.kt index bb4312181..574983807 100644 --- a/app/src/main/kotlin/org/akanework/gramophone/ui/fragments/settings/ExperimentalSettingsTopFragment.kt +++ b/app/src/main/kotlin/org/akanework/gramophone/ui/fragments/settings/ExperimentalSettingsTopFragment.kt @@ -82,11 +82,6 @@ class ExperimentalSettingsTopFragment : BasePreferenceFragment() { private fun checkAndRequestNotificationPermission() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - if (!isAdded) { - // Fragment 未附着,推迟操作或记录日志 - Log.e("Fragment", "Fragment not attached to context yet") - return - } when { ActivityCompat.checkSelfPermission( requireContext(),