From fe37fc3369385df610f250d68c8f93e176ad0039 Mon Sep 17 00:00:00 2001 From: Mateusz Skoczek Date: Fri, 8 Mar 2024 00:07:22 +0100 Subject: [PATCH 1/6] names changed, layer of abstraction added --- ...del.cs => HomeVideoCollectionViewModel.cs} | 18 ++++++++--------- .../Home/HomeViewModel.cs | 6 +++--- ...View.xaml => HomeVideoCollectionView.xaml} | 2 +- ...aml.cs => HomeVideoCollectionView.xaml.cs} | 4 ++-- .../VDownload.Core.Views.csproj | 4 ++-- .../ViewModelToViewConverter.cs | 2 +- VDownload.Models/Playlist.cs | 4 +--- VDownload.Models/Source.cs | 3 ++- VDownload.Models/SubscriptionList.cs | 20 +++++++++++++++++++ VDownload.Models/VideoCollection.cs | 18 +++++++++++++++++ VDownload/App.xaml.cs | 4 ++-- 11 files changed, 61 insertions(+), 24 deletions(-) rename VDownload.Core/VDownload.Core.ViewModels/Home/{HomePlaylistViewModel.cs => HomeVideoCollectionViewModel.cs} (92%) rename VDownload.Core/VDownload.Core.Views/Home/{HomePlaylistView.xaml => HomeVideoCollectionView.xaml} (99%) rename VDownload.Core/VDownload.Core.Views/Home/{HomePlaylistView.xaml.cs => HomeVideoCollectionView.xaml.cs} (82%) create mode 100644 VDownload.Models/SubscriptionList.cs create mode 100644 VDownload.Models/VideoCollection.cs diff --git a/VDownload.Core/VDownload.Core.ViewModels/Home/HomePlaylistViewModel.cs b/VDownload.Core/VDownload.Core.ViewModels/Home/HomeVideoCollectionViewModel.cs similarity index 92% rename from VDownload.Core/VDownload.Core.ViewModels/Home/HomePlaylistViewModel.cs rename to VDownload.Core/VDownload.Core.ViewModels/Home/HomeVideoCollectionViewModel.cs index 073c560..ddba5b0 100644 --- a/VDownload.Core/VDownload.Core.ViewModels/Home/HomePlaylistViewModel.cs +++ b/VDownload.Core/VDownload.Core.ViewModels/Home/HomeVideoCollectionViewModel.cs @@ -24,7 +24,7 @@ using VDownload.Services.Data.Application; namespace VDownload.Core.ViewModels.Home { - public partial class HomePlaylistViewModel : ObservableObject + public partial class HomeVideoCollectionViewModel : ObservableObject { #region SERVICES @@ -43,7 +43,7 @@ namespace VDownload.Core.ViewModels.Home #region FIELDS - protected Playlist _playlist; + protected VideoCollection _collection; protected List _removedVideos; @@ -181,7 +181,7 @@ namespace VDownload.Core.ViewModels.Home #region CONSTRUCTORS - public HomePlaylistViewModel(IDownloadTaskManager tasksManager, ISettingsService settingsService, IStoragePickerService storagePickerService, IFilenameService filenameService, IDialogsService dialogsService, IStringResourcesService stringResourcesService, IApplicationDataService applicationDataService) + public HomeVideoCollectionViewModel(IDownloadTaskManager tasksManager, ISettingsService settingsService, IStoragePickerService storagePickerService, IFilenameService filenameService, IDialogsService dialogsService, IStringResourcesService stringResourcesService, IApplicationDataService applicationDataService) { _tasksManager = tasksManager; _settingsService = settingsService; @@ -202,10 +202,10 @@ namespace VDownload.Core.ViewModels.Home #region PUBLIC METHODS - public void LoadPlaylist(Playlist playlist) + public void LoadPlaylist(VideoCollection collection) { - _playlist = playlist; - ParallelQuery