This commit is contained in:
2024-02-28 01:22:13 +01:00
Unverified
parent e3ec5c3a48
commit 74eb899e31
51 changed files with 562 additions and 608 deletions

View File

@@ -75,15 +75,15 @@ namespace VDownload.Services.Data.Settings
public async Task Load()
{
Data = null;
if (File.Exists(_filePath))
{
string content = await File.ReadAllTextAsync(_filePath);
Data = JsonConvert.DeserializeObject<SettingsData>(content);
}
Data ??= new SettingsData();
else
{
Data = new SettingsData();
}
}
public async Task Save()