mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
chore: 无配置字段时储存默认值
This commit is contained in:
@@ -54,9 +54,14 @@ namespace MaaWpfGui.Helper
|
||||
|
||||
_logger.Debug("Read configuration key {Key} with default value {DefaultValue}, configuration hit: {HasValue}, configuration value {Value}", key, defaultValue, hasValue, value);
|
||||
|
||||
return hasValue
|
||||
? value
|
||||
: defaultValue;
|
||||
if (hasValue)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
// return hasValue ? value : defaultValue;
|
||||
SetValue(key, defaultValue);
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public static string GetGlobalValue(string key, string defaultValue)
|
||||
|
||||
Reference in New Issue
Block a user