Fixed issues with language selection

Fixed game name field not resetting properly
This commit is contained in:
Jeddunk 2020-12-29 12:32:04 +01:00
parent 933e84cdaa
commit a5ca4ceb33
5 changed files with 43 additions and 47 deletions

View file

@ -17,8 +17,6 @@ namespace auto_creamapi.Services
{
public interface ICacheService
{
public List<string> Languages { get; }
public Task Initialize();
//public Task UpdateCache();
@ -48,7 +46,6 @@ namespace auto_creamapi.Services
public CacheService()
{
Languages = Misc.DefaultLanguages;
}
/*public async void Initialize()
@ -57,8 +54,6 @@ namespace auto_creamapi.Services
await UpdateCache();
}*/
public List<string> Languages { get; }
public async Task Initialize()
{
MyLogger.Log.Information("Updating cache...");

View file

@ -162,7 +162,7 @@ namespace auto_creamapi.Services
private void ResetConfigData()
{
Config.AppId = -1;
Config.Language = "";
Config.Language = Misc.DefaultLanguageSelection;
Config.UnlockAll = false;
Config.ExtraProtection = false;
Config.ForceOffline = false;
@ -191,21 +191,7 @@ namespace auto_creamapi.Services
public override string ToString()
{
var str = $"INI file: {_configFilePath}, " +
$"AppID: {Config.AppId}, " +
$"Language: {Config.Language}, " +
$"UnlockAll: {Config.UnlockAll}, " +
$"ExtraProtection: {Config.ExtraProtection}, " +
$"ForceOffline: {Config.ForceOffline}, " +
$"DLC ({Config.DlcList.Count}):\n[\n";
if (Config.DlcList.Count > 0)
str = Config.DlcList.Aggregate(str, (current, x) => current + $" {x.AppId}={x.Name},\n");
/*foreach (var (key, value) in Config.DlcList)
{
str += $" {key}={value},\n";
}*/
str += "]";
var str = $"INI file: {_configFilePath}\n{Config}";
return str;
}