Fixed a lyrics crash
This commit is contained in:
parent
7a82883f57
commit
91b7eeeb45
3 changed files with 8 additions and 4 deletions
|
@ -101,7 +101,7 @@ dependencies {
|
|||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation "androidx.preference:preference-ktx:$preference_version"
|
||||
implementation 'androidx.core:core-ktx:1.8.0'
|
||||
implementation "androidx.core:core-ktx:$core_version"
|
||||
implementation 'androidx.palette:palette-ktx:1.0.0'
|
||||
|
||||
implementation 'androidx.mediarouter:mediarouter:1.3.0'
|
||||
|
@ -133,7 +133,7 @@ dependencies {
|
|||
def retrofit_version = '2.9.0'
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.8'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.9'
|
||||
|
||||
def material_dialog_version = "3.3.0"
|
||||
implementation "com.afollestad.material-dialogs:core:$material_dialog_version"
|
||||
|
|
|
@ -52,6 +52,7 @@ import code.name.monkey.retromusic.util.color.MediaNotificationProcessor
|
|||
import code.name.monkey.retromusic.util.logD
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class PlayerAlbumCoverFragment : AbsMusicServiceFragment(R.layout.fragment_player_album_cover),
|
||||
ViewPager.OnPageChangeListener, MusicProgressViewUpdateHelper.Callback,
|
||||
|
@ -95,8 +96,10 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(R.layout.fragment_playe
|
|||
if (embeddedLyrics != null) {
|
||||
binding.lyricsView.loadLrc(embeddedLyrics)
|
||||
} else {
|
||||
binding.lyricsView.reset()
|
||||
binding.lyricsView.setLabel(context?.getString(R.string.no_lyrics_found))
|
||||
withContext(Dispatchers.Main) {
|
||||
binding.lyricsView.reset()
|
||||
binding.lyricsView.setLabel(context?.getString(R.string.no_lyrics_found))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ buildscript {
|
|||
mdc_version = '1.7.0-alpha02'
|
||||
preference_version = '1.2.0'
|
||||
appcompat_version = '1.4.2'
|
||||
core_version='1.8.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue