mirror of
https://github.com/tgeorgiadis/quiver-launcher.git
synced 2026-11-26 07:11:27 -05:00
24 lines
650 B
C#
24 lines
650 B
C#
using System.Collections.ObjectModel;
|
|
using QuiverLauncher.Models;
|
|
using QuiverLauncher.Services;
|
|
|
|
namespace QuiverLauncher.ViewModels;
|
|
|
|
public class SettingsViewModel
|
|
{
|
|
private readonly ISettingsStore _settingsStore;
|
|
|
|
public SettingsViewModel(ISettingsStore? settingsStore = null)
|
|
{
|
|
_settingsStore = settingsStore ?? SettingsStoreProvider.Default;
|
|
}
|
|
|
|
public AppSettings Current => _settingsStore.Current;
|
|
|
|
public AppSettings Load() => _settingsStore.Load();
|
|
|
|
public void Save(AppSettings settings) => _settingsStore.Save(settings);
|
|
|
|
public void SaveCurrent() => _settingsStore.Save(_settingsStore.Current);
|
|
}
|