[Android] Fix empty view state in save playlist dialog

Geoffrey Métais git at videolan.org
Wed Dec 20 17:10:11 CET 2017


vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 19 16:02:26 2017 +0100| [8ca03e6e9474866287e5a0fef1b361e7ef213443] | committer: Geoffrey Métais

Fix empty view state in save playlist dialog

(cherry picked from commit 01d1c1ede4f0f0e80fa0040b1855d20765510d4d)

> https://code.videolan.org/videolan/vlc-android/commit/8ca03e6e9474866287e5a0fef1b361e7ef213443
---

 vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java
index 129efecab..0d02aac77 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.java
@@ -81,7 +81,6 @@ public class SavePlaylistDialog extends DialogFragment implements View.OnClickLi
         super.onCreate(savedInstanceState);
         mMedialibrary = VLCApplication.getMLInstance();
         mAdapter = new AudioBrowserAdapter(MediaLibraryItem.TYPE_PLAYLIST, this, false);
-        mAdapter.addAll(new ArrayList<MediaLibraryItem>(Arrays.asList(mMedialibrary.getPlaylists())));
         mTracks = (MediaWrapper[]) getArguments().getParcelableArray(KEY_TRACKS);
         mNewTrack = (MediaWrapper[]) getArguments().getParcelableArray(KEY_NEW_TRACKS);
     }
@@ -125,7 +124,7 @@ public class SavePlaylistDialog extends DialogFragment implements View.OnClickLi
         mEditText.setOnEditorActionListener(this);
         mListView.setLayoutManager(new LinearLayoutManager(view.getContext()));
         mListView.setAdapter(mAdapter);
-        updateEmptyView();
+        mAdapter.update(new ArrayList<MediaLibraryItem>(Arrays.asList(mMedialibrary.getPlaylists())));
     }
 
     void updateEmptyView() {



More information about the Android mailing list