Fix song removing in playlist by position

This commit is contained in:
CappielloAntonio 2021-08-15 17:07:03 +02:00
parent 474df23add
commit 501a7af61e
2 changed files with 3 additions and 3 deletions

View file

@ -74,9 +74,9 @@ public class PlaylistEditorViewModel extends AndroidViewModel {
return songLiveList;
}
public void removeFromPlaylistSongLiveList(Song song) {
public void removeFromPlaylistSongLiveList(int position) {
List<Song> songs = songLiveList.getValue();
Objects.requireNonNull(songs).remove(song);
Objects.requireNonNull(songs).remove(position);
songLiveList.postValue(songs);
}