mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add settings save lock
This commit is contained in:
parent
e4577eb23e
commit
043fe76a61
1 changed files with 8 additions and 3 deletions
|
|
@ -37,6 +37,8 @@ namespace Flow.Launcher
|
|||
private readonly Internationalization _translater;
|
||||
private readonly MainViewModel _mainVM;
|
||||
|
||||
private readonly object _saveSettingsLock = new();
|
||||
|
||||
#region Constructor
|
||||
|
||||
public PublicAPIInstance(Settings settings, Internationalization translater, MainViewModel mainVM)
|
||||
|
|
@ -92,9 +94,12 @@ namespace Flow.Launcher
|
|||
|
||||
public void SaveAppAllSettings()
|
||||
{
|
||||
PluginManager.Save();
|
||||
_mainVM.Save();
|
||||
_settings.Save();
|
||||
lock (_saveSettingsLock)
|
||||
{
|
||||
_settings.Save();
|
||||
PluginManager.Save();
|
||||
_mainVM.Save();
|
||||
}
|
||||
_ = ImageLoader.SaveAsync();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue