[Android] Change the "no playlist" empty text

Nicolas Pomepuy git at videolan.org
Tue Jun 25 12:16:39 UTC 2024


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Jun 25 08:11:23 2024 +0200| [2dca470c383a086904bb624c1a7e74cba30643ef] | committer: Duncan McNamara

Change the "no playlist" empty text

> https://code.videolan.org/videolan/vlc-android/commit/2dca470c383a086904bb624c1a7e74cba30643ef
---

 application/vlc-android/src/org/videolan/vlc/gui/PlaylistFragment.kt  | 4 ++--
 .../src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt    | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/PlaylistFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/PlaylistFragment.kt
index c933c653db..7df57a43dd 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/PlaylistFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/PlaylistFragment.kt
@@ -149,13 +149,13 @@ class PlaylistFragment : BaseAudioBrowser<PlaylistsViewModel>(), SwipeRefreshLay
     private fun updateEmptyView() {
         if (!isAdded) return
         swipeRefreshLayout.visibility = if (Medialibrary.getInstance().isInitiated) View.VISIBLE else View.GONE
-        binding.emptyLoading.emptyText = viewModel.filterQuery?.let {  getString(R.string.empty_search, it) } ?: if (viewModel.provider.onlyFavorites) getString(R.string.nofav) else getString(R.string.nomedia)
+        binding.emptyLoading.emptyText = viewModel.filterQuery?.let {  getString(R.string.empty_search, it) } ?: if (viewModel.provider.onlyFavorites) getString(R.string.nofav) else getString(R.string.noplaylist)
         binding.emptyLoading.state =
                 when {
                     viewModel.provider.loading.value == true && empty -> EmptyLoadingState.LOADING
                     empty && viewModel.provider.onlyFavorites -> EmptyLoadingState.EMPTY_FAVORITES
                     empty && viewModel.filterQuery != null -> EmptyLoadingState.EMPTY_SEARCH
-                    empty -> EmptyLoadingState.EMPTY
+                    empty -> EmptyLoadingState.EMPTY_SEARCH
                     else -> EmptyLoadingState.NONE
                 }
     }
diff --git a/application/webserver/src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt b/application/webserver/src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt
index b27df34e15..339a6ee7f3 100644
--- a/application/webserver/src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt
+++ b/application/webserver/src/main/java/org/videolan/vlc/webserver/TranslationMapping.kt
@@ -51,6 +51,7 @@ object TranslationMapping {
         SEND_FILES(R.string.ra_send_files),
         DOWNLOAD(R.string.download),
         NO_MEDIA(R.string.nomedia),
+        NO_PLAYLIST(R.string.noplaylist),
         PLAY(R.string.play),
         APPEND(R.string.append),
         PLAY_AS_AUDIO(R.string.play_as_audio),



More information about the Android mailing list