@@ -11,26 +11,19 @@ public sealed class MainViewModel : ObservableObject
1111 private readonly IDownloadDataAccess dataAccess ;
1212 private readonly Action < ( string Message , bool IsError ) > showNotification ;
1313
14- private string ? downloadUrl ;
15- public string ? DownloadUrl { get => downloadUrl ; set => Set ( ref downloadUrl , value ) ; }
14+ public string ? DownloadUrl { get ; set => Set ( ref field , value ) ; }
1615
17- private bool audioOnly ;
18- public bool AudioOnly { get => audioOnly ; set => Set ( ref audioOnly , value ) ; }
16+ public bool AudioOnly { get ; set => Set ( ref field , value ) ; }
1917
20- private string ? destinationFolder ;
21- public string ? DestinationFolder { get => destinationFolder ; set => Set ( ref destinationFolder , value ) ; }
18+ public string ? DestinationFolder { get ; set => Set ( ref field , value ) ; }
2219
23- private double ? progressFraction ;
24- public double ? ProgressFraction { get => progressFraction ; set => Set ( ref progressFraction , value ) ; }
20+ public double ? ProgressFraction { get ; set => Set ( ref field , value ) ; }
2521
26- private bool isEditable = true ;
27- public bool IsEditable { get => isEditable ; set => Set ( ref isEditable , value ) ; }
22+ public bool IsEditable { get ; set => Set ( ref field , value ) ; } = true ;
2823
29- private bool isProgressBarVisible ;
30- public bool IsProgressBarVisible { get => isProgressBarVisible ; set => Set ( ref isProgressBarVisible , value ) ; }
24+ public bool IsProgressBarVisible { get ; set => Set ( ref field , value ) ; }
3125
32- private string ? status ;
33- public string ? Status { get => status ; set => Set ( ref status , value ) ; }
26+ public string ? Status { get ; set => Set ( ref field , value ) ; }
3427
3528 public Command Start { get ; }
3629
@@ -41,9 +34,9 @@ public MainViewModel(IDownloadDataAccess dataAccess, Action<(string Message, boo
4134 this . dataAccess = dataAccess ;
4235 this . showNotification = showNotification ;
4336
44- audioOnly = Properties . Settings . Default . AudioOnly ;
37+ AudioOnly = Properties . Settings . Default . AudioOnly ;
4538
46- destinationFolder = Directory . Exists ( Properties . Settings . Default . DestinationFolder )
39+ DestinationFolder = Directory . Exists ( Properties . Settings . Default . DestinationFolder )
4740 ? Properties . Settings . Default . DestinationFolder
4841 : Environment . GetFolderPath ( Environment . SpecialFolder . DesktopDirectory ) ;
4942
0 commit comments