[Android] TV: show favorites even on root level
Nicolas Pomepuy
git at videolan.org
Mon Nov 23 13:24:30 CET 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov 19 10:23:56 2020 +0100| [a73f891f942ec2ce1d9aa4199f04d60009bf591c] | committer: Nicolas Pomepuy
TV: show favorites even on root level
> https://code.videolan.org/videolan/vlc-android/commit/a73f891f942ec2ce1d9aa4199f04d60009bf591c
---
.../org/videolan/television/ui/browser/FileBrowserTvFragment.kt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt b/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
index d17852533..22693efe8 100644
--- a/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
@@ -194,14 +194,14 @@ class FileBrowserTvFragment : BaseBrowserTvFragment<MediaLibraryItem>(), PathAda
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
lifecycleScope.launch {
- animationDelegate.setVisibility(binding.favoriteButton, if (isRootLevel) View.GONE else View.VISIBLE)
+ animationDelegate.setVisibility(binding.favoriteButton, View.VISIBLE)
animationDelegate.setVisibility(binding.imageButtonFavorite, View.VISIBLE)
animationDelegate.setVisibility(binding.favoriteDescription, View.VISIBLE)
favExists = (currentItem as? MediaWrapper)?.let { browserFavRepository.browserFavExists(it.uri) } ?: false
binding.favoriteButton.setImageResource(if (favExists) R.drawable.ic_bookmark else R.drawable.ic_bookmark_outline)
binding.imageButtonFavorite.setImageResource(if (favExists) R.drawable.ic_fabtvmini_bookmark else R.drawable.ic_fabtvmini_bookmark_outline)
}
- if (!isRootLevel) binding.favoriteButton.setOnClickListener(favoriteClickListener)
+ binding.favoriteButton.setOnClickListener(favoriteClickListener)
binding.imageButtonFavorite.setOnClickListener(favoriteClickListener)
binding.emptyLoading.showNoMedia = false
}
@@ -272,7 +272,7 @@ class FileBrowserTvFragment : BaseBrowserTvFragment<MediaLibraryItem>(), PathAda
}
}
favExists = browserFavRepository.browserFavExists(mw.uri)
- if (!isRootLevel) binding.favoriteButton.setImageResource(if (favExists) R.drawable.ic_bookmark else R.drawable.ic_bookmark_outline)
+ binding.favoriteButton.setImageResource(if (favExists) R.drawable.ic_bookmark else R.drawable.ic_bookmark_outline)
binding.imageButtonFavorite.setImageResource(if (favExists) R.drawable.ic_fabtvmini_bookmark else R.drawable.ic_fabtvmini_bookmark_outline)
}
}
More information about the Android
mailing list