Updates profile remark based on core type (#7076)

pull/7089/head
DHR60 2025-04-07 09:58:16 +08:00 committed by GitHub
parent 24ccfb8077
commit 75b399b48b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 7 deletions

View File

@ -1023,6 +1023,8 @@ public class ConfigHandler
var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new(); var profileItem = await AppHandler.Instance.GetProfileItem(indexId) ?? new();
profileItem.IndexId = indexId; profileItem.IndexId = indexId;
if (coreType == ECoreType.Xray)
{
profileItem.Remarks = multipleLoad switch profileItem.Remarks = multipleLoad switch
{ {
EMultipleLoad.Random => ResUI.menuSetDefaultMultipleServerXrayRandom, EMultipleLoad.Random => ResUI.menuSetDefaultMultipleServerXrayRandom,
@ -1031,6 +1033,11 @@ public class ConfigHandler
EMultipleLoad.LeastLoad => ResUI.menuSetDefaultMultipleServerXrayLeastLoad, EMultipleLoad.LeastLoad => ResUI.menuSetDefaultMultipleServerXrayLeastLoad,
_ => ResUI.menuSetDefaultMultipleServerXrayRoundRobin, _ => ResUI.menuSetDefaultMultipleServerXrayRoundRobin,
}; };
}
else if (coreType == ECoreType.sing_box)
{
profileItem.Remarks = ResUI.menuSetDefaultMultipleServerSingBoxLeastPing;
}
profileItem.Address = Global.CoreMultipleLoadConfigFileName; profileItem.Address = Global.CoreMultipleLoadConfigFileName;
profileItem.ConfigType = EConfigType.Custom; profileItem.ConfigType = EConfigType.Custom;
profileItem.CoreType = coreType; profileItem.CoreType = coreType;