Fix delete playlist

This commit is contained in:
Thomas 2020-09-12 12:27:54 +02:00
parent 58404694e0
commit b272a5b5f9
1 changed files with 1 additions and 1 deletions

View File

@ -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);