Commit cbc27f2a authored by Geoffrey Métais's avatar Geoffrey Métais

Fix build

parent acc0f1c0
......@@ -366,7 +366,7 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
@Override
public void run() {
if (mIsPlaylist) ((Playlist) mPlaylist).remove(position);
else removeItem(media);
else removeItem(position, media);
}
});
break;
......@@ -386,13 +386,13 @@ public class PlaylistActivity extends AudioPlayerContainerActivity implements IE
}
private void removeItem(final MediaWrapper media) {
private void removeItem(final int position, final MediaWrapper media) {
final int resId = mIsPlaylist ? R.string.confirm_remove_from_playlist : R.string.confirm_delete;
if (mIsPlaylist) {
UiTools.snackerConfirm(mBinding.getRoot(), getString(resId, media.getTitle()), new Runnable() {
@Override
public void run() {
((Playlist) mPlaylist).remove(media.getId());
((Playlist) mPlaylist).remove(position);
}
});
} else {
......
......@@ -31,6 +31,7 @@ import android.view.View;
import com.google.android.material.tabs.TabLayout;
import org.jetbrains.annotations.NotNull;
import org.videolan.medialibrary.media.MediaLibraryItem;
import org.videolan.medialibrary.media.MediaWrapper;
import org.videolan.vlc.R;
......
......@@ -127,8 +127,8 @@ class SavePlaylistDialog : VLCBottomSheetDialogFragment(), View.OnClickListener,
tracks = if (addTracks) {
mNewTrack
} else {//Save a playlist
for (mw in playlist.tracks) {
playlist.remove(mw.id)
for (index in 0 until playlist.tracks.size) {
playlist.remove(index)
}
mTracks
}
......
......@@ -37,6 +37,7 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import org.jetbrains.annotations.NotNull;
import org.videolan.medialibrary.Medialibrary;
import org.videolan.medialibrary.media.Folder;
import org.videolan.medialibrary.media.MediaLibraryItem;
......@@ -400,8 +401,7 @@ public class VideoGridFragment extends MediaBrowserFragment<VideosModel> impleme
}
@Override
public void onImageClick(@NotNull View v, int position, @NotNull MediaLibraryItem item) {
}
public void onImageClick(@NotNull View v, int position, @NotNull MediaLibraryItem item) {}
@Override
public void onCtxClick(View v, int position, MediaLibraryItem item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment