From b272a5b5f9720819e89eb055038bb6b1c4194a4a Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 12 Sep 2020 12:27:54 +0200 Subject: [PATCH] Fix delete playlist --- .../java/app/fedilab/fedilabtube/drawer/PlaylistAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/fedilabtube/drawer/PlaylistAdapter.java b/app/src/main/java/app/fedilab/fedilabtube/drawer/PlaylistAdapter.java index a75bdcd..226f321 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/drawer/PlaylistAdapter.java +++ b/app/src/main/java/app/fedilab/fedilabtube/drawer/PlaylistAdapter.java @@ -135,7 +135,7 @@ public class PlaylistAdapter extends BaseAdapter { playlists.remove(playlist); notifyDataSetChanged(); PlaylistsVM viewModel = new ViewModelProvider((ViewModelStoreOwner) context).get(PlaylistsVM.class); - viewModel.manage(PlaylistsVM.action.DELETE_PLAYLIST, null, null, null).observe((LifecycleOwner) context, apiResponse -> manageVIewPlaylists(PlaylistsVM.action.DELETE_PLAYLIST, apiResponse)); + viewModel.manage(PlaylistsVM.action.DELETE_PLAYLIST, playlist, null, null).observe((LifecycleOwner) context, apiResponse -> manageVIewPlaylists(PlaylistsVM.action.DELETE_PLAYLIST, apiResponse)); if (playlists.size() == 0 && textviewNoAction != null && textviewNoAction.getVisibility() == View.GONE) textviewNoAction.setVisibility(View.VISIBLE);