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