Hide Cast & Crew section when there are none

This commit is contained in:
Jarne Demeulemeester 2021-07-20 16:27:36 +02:00
parent 3d450ef203
commit a91a8ba72f
No known key found for this signature in database
GPG key ID: 60884A0C1EBA43E5
2 changed files with 8 additions and 0 deletions

View file

@ -55,6 +55,13 @@ class MediaInfoFragment : Fragment() {
}
})
viewModel.actors.observe(viewLifecycleOwner, { actors ->
when (actors.isNullOrEmpty()) {
false -> binding.actors.visibility = View.VISIBLE
true -> binding.actors.visibility = View.GONE
}
})
viewModel.navigateToPlayer.observe(viewLifecycleOwner, { mediaSource ->
mediaSource.id?.let {
navigateToPlayerActivity(

View file

@ -348,6 +348,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/actors"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">