fix playlists crash

This commit is contained in:
Bnyro 2022-11-18 16:27:55 +01:00
parent 89be23a858
commit 6c2249e52f

View File

@ -95,11 +95,12 @@ class PlaylistFragment : BaseFragment() {
binding.playlistName.maxLines = if (binding.playlistName.maxLines == 2) Int.MAX_VALUE else 2
}
binding.playlistInfo.text = response.uploader + TextUtils.SEPARATOR + getString(R.string.videoCount, response.videos.toString())
binding.playlistInfo.text = (if (response.uploader != null) response.uploader + TextUtils.SEPARATOR else "") +
getString(R.string.videoCount, response.videos.toString())
// show playlist options
binding.optionsMenu.setOnClickListener {
PlaylistOptionsBottomSheet(playlistId!!, playlistName!!, isOwner).show(
PlaylistOptionsBottomSheet(playlistId!!, playlistName ?: "", isOwner).show(
childFragmentManager,
PlaylistOptionsBottomSheet::class.java.name
)