chore: 当前配置不存在时尝试读取全局配置

This commit is contained in:
uye
2024-12-30 15:04:18 +08:00
parent 32bceb99c2
commit de5e2c1ad1

View File

@@ -59,6 +59,14 @@ namespace MaaWpfGui.Helper
return value;
}
hasValue = _globalKvs.TryGetValue(key, out value);
if (hasValue)
{
_logger.Information("Read configuration key {Key} with global configuration value {Value}, configuration hit: {HasValue}, configuration value {Value}", key, value, true, value);
SetValue(key, value);
return value;
}
// return hasValue ? value : defaultValue;
SetValue(key, defaultValue);
return defaultValue;