mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Null checking
This commit is contained in:
parent
856cc04d4d
commit
a668236202
1 changed files with 6 additions and 4 deletions
|
|
@ -45,11 +45,13 @@ public class PlayerLyricsFragment extends Fragment {
|
||||||
|
|
||||||
private void initLyrics() {
|
private void initLyrics() {
|
||||||
playerBottomSheetViewModel.getLiveLyrics().observe(requireActivity(), lyrics -> {
|
playerBottomSheetViewModel.getLiveLyrics().observe(requireActivity(), lyrics -> {
|
||||||
|
if (bind != null) {
|
||||||
if (lyrics == null || lyrics.trim().equals("")) {
|
if (lyrics == null || lyrics.trim().equals("")) {
|
||||||
bind.nowPlayingSongLyricsTextView.setText(R.string.player_song_lyrics_none_available_label);
|
bind.nowPlayingSongLyricsTextView.setText(R.string.player_song_lyrics_none_available_label);
|
||||||
} else {
|
} else {
|
||||||
bind.nowPlayingSongLyricsTextView.setText(MusicUtil.getReadableString(lyrics));
|
bind.nowPlayingSongLyricsTextView.setText(MusicUtil.getReadableString(lyrics));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue