resolved warnings

This commit is contained in:
2023-07-24 14:31:20 -06:00
parent 6232a7a94e
commit d1383fe1d4
17 changed files with 261 additions and 134 deletions

View File

@@ -5,12 +5,24 @@ using LocalModels;
public class CoursePlanner
{
public LocalCourse _localCourse { get; set; } = default!;
public LocalCourse LocalCourse
private readonly YamlManager yamlManager;
public CoursePlanner(YamlManager yamlManager)
{
this.yamlManager = yamlManager;
}
private LocalCourse? _localCourse { get; set; }
public LocalCourse? LocalCourse
{
get => _localCourse;
set
{
// ignore initial load of course
if (_localCourse != null && value != null)
{
yamlManager.SaveCourse(value);
}
_localCourse = value;
StateHasChanged?.Invoke();
}