[Android] Fix snackbar shown twice when deleting files from album screen

Nicolas Pomepuy git at videolan.org
Thu Apr 11 10:18:52 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Wed Apr 10 11:09:31 2019 +0200| [5c1aa5dda3215aa2203f4de92f9ae1dfe5a40a50] | committer: Geoffrey Métais

Fix snackbar shown twice when deleting files from album screen

> https://code.videolan.org/videolan/vlc-android/commit/5c1aa5dda3215aa2203f4de92f9ae1dfe5a40a50
---

 vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java b/vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
index 78fb73825..c46045344 100644
--- a/vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/PlaylistActivity.java
@@ -361,14 +361,7 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
                 showInfoDialog(media);
                 break;
             case Constants.CTX_DELETE:
-                final int resId = mIsPlaylist ? R.string.confirm_remove_from_playlist : R.string.confirm_delete;
-                UiTools.snackerConfirm(mBinding.getRoot(), getString(resId, media.getTitle()), new Runnable() {
-                    @Override
-                    public void run() {
-                        if (mIsPlaylist) ((Playlist) mPlaylist).remove(position);
-                        else removeItem(position, media);
-                    }
-                });
+                removeItem(position, media);
                 break;
             case Constants.CTX_APPEND:
                 MediaUtils.INSTANCE.appendMedia(this, media.getTracks());



More information about the Android mailing list