mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Update OsuConfigManager
in line with ConfigManager
logging changes
This commit is contained in:
parent
3fb3a18e68
commit
c86a75aa5f
@ -4,10 +4,8 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Configuration.Tracking;
|
||||
using osu.Framework.Extensions;
|
||||
@ -31,6 +29,12 @@ namespace osu.Game.Configuration
|
||||
[ExcludeFromDynamicCompile]
|
||||
public class OsuConfigManager : IniConfigManager<OsuSetting>
|
||||
{
|
||||
public OsuConfigManager(Storage storage)
|
||||
: base(storage)
|
||||
{
|
||||
Migrate();
|
||||
}
|
||||
|
||||
protected override void InitialiseDefaults()
|
||||
{
|
||||
// UI/selection defaults
|
||||
@ -172,12 +176,9 @@ namespace osu.Game.Configuration
|
||||
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
||||
}
|
||||
|
||||
public IDictionary<OsuSetting, string> GetLoggableState() =>
|
||||
new Dictionary<OsuSetting, string>(ConfigStore.Where(kvp => !keyContainsPrivateInformation(kvp.Key)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToString()));
|
||||
|
||||
private static bool keyContainsPrivateInformation(OsuSetting argKey)
|
||||
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
|
||||
{
|
||||
switch (argKey)
|
||||
switch (lookup)
|
||||
{
|
||||
case OsuSetting.Token:
|
||||
return true;
|
||||
@ -186,12 +187,6 @@ namespace osu.Game.Configuration
|
||||
return false;
|
||||
}
|
||||
|
||||
public OsuConfigManager(Storage storage)
|
||||
: base(storage)
|
||||
{
|
||||
Migrate();
|
||||
}
|
||||
|
||||
public void Migrate()
|
||||
{
|
||||
// arrives as 2020.123.0
|
||||
|
Loading…
Reference in New Issue
Block a user