diff --git a/Playlist.cs b/Playlist.cs index 1300d6f..daaa390 100644 --- a/Playlist.cs +++ b/Playlist.cs @@ -39,7 +39,7 @@ public override IEnumerable GetSidebarItems() Opened = () => { if (PlaylistViewModel == null) { - PlaylistViewModel = new PlaylistViewModel(this); + PlaylistViewModel = new PlaylistViewModel(PlaylistGames, PlayniteApi); PlaylistView = new PlaylistView(PlaylistViewModel); } return PlaylistView; diff --git a/PlaylistViewModel.cs b/PlaylistViewModel.cs index acbedce..42b969c 100644 --- a/PlaylistViewModel.cs +++ b/PlaylistViewModel.cs @@ -10,8 +10,6 @@ namespace Playlist { public class PlaylistViewModel : ObservableObject { - private readonly Playlist playlist; - private readonly IPlayniteAPI playniteApi; public ObservableCollection PlaylistGames { get; set; } @@ -49,11 +47,10 @@ public IEnumerable playlistGames, IPlayniteAPI playniteApi) { - this.playlist = playlist; - PlaylistGames = playlist.PlaylistGames; - playniteApi = playlist.PlayniteApi; + PlaylistGames = playlistGames; + this.playniteApi = playniteApi; NavigateBackCommand = new RelayCommand((a) => {