enhance: support save RepositoryNode changes instantly

This commit is contained in:
Gadfly 2024-09-02 12:05:24 +08:00
parent 28b6ce4993
commit c85293c86a
No known key found for this signature in database
3 changed files with 15 additions and 11 deletions

View file

@ -75,6 +75,12 @@ namespace SourceGit
AvaloniaXamlLoader.Load(this);
var pref = ViewModels.Preference.Instance;
pref.PropertyChanged += (_1, _2) =>
{
#pragma warning disable CS4014
pref.SaveAsync();
#pragma warning restore CS4014
};
SetLocale(pref.Locale);
SetTheme(pref.Theme, pref.ThemeOverrides);
SetFonts(pref.DefaultFontFamily, pref.MonospaceFontFamily, pref.OnlyUseMonoFontInEditor);