enhance: do NOT save preference.json while loading

This commit is contained in:
leo 2024-09-10 16:37:39 +08:00
parent 88fb43e4fb
commit 7b2da25c0b
No known key found for this signature in database

View file

@ -431,6 +431,9 @@ namespace SourceGit.ViewModels
public void Save()
{
if (_isLoading)
return;
var file = Path.Combine(Native.OS.DataDir, "preference.json");
var data = JsonSerializer.Serialize(this, JsonCodeGen.Default.Preference);
File.WriteAllText(file, data);