|
@@ -101,7 +101,7 @@ namespace InABox.Configuration
|
|
|
new Client<UserSettings>().Save(setting, "", (o, e) => { });
|
|
|
}
|
|
|
|
|
|
- public override void SaveAll(Dictionary<string, T> objs)
|
|
|
+ public override void SaveAll(Dictionary<string, T> objs, bool reset = false)
|
|
|
{
|
|
|
foreach (var (section, obj) in objs)
|
|
|
{
|
|
@@ -109,8 +109,9 @@ namespace InABox.Configuration
|
|
|
}
|
|
|
|
|
|
var client = new Client<UserSettings>();
|
|
|
- var data = client.Load(
|
|
|
- new Filter<UserSettings>(x => x.Section).IsEqualTo(typeof(T).Name)
|
|
|
+ var data = reset
|
|
|
+ ? new Dictionary<string,UserSettings>()
|
|
|
+ : client.Load(new Filter<UserSettings>(x => x.Section).IsEqualTo(typeof(T).Name)
|
|
|
.And(x => x.Key).InList(objs.Keys.ToArray())
|
|
|
.And(x => x.UserID).IsEqualTo(ClientFactory.UserID))
|
|
|
.ToDictionary(x => x.Key, x => x);
|