fix: 修复选中服务器->测速 后,当前服务器会丢失选中的情况

在客户端选中一个服务器->测速时,SelectedProfile会变为null,导致被视为没有选中服务器,会影响右键菜单以及快捷键的操作
例如ctrl+p后按enter,无法设置为活动服务器,反而会跳转到下一行
This commit is contained in:
ShiinaRinne 2023-02-26 11:46:09 +08:00 committed by GitHub
parent 3ab992f5fb
commit a907b16070
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -556,8 +556,8 @@ namespace v2rayN.ViewModels
{
return;
}
SpeedProxyDisplay = string.Format("{0}:{1}/s¡ü | {2}/s¡ý", Global.agentTag, Utils.HumanFy(update.proxyUp), Utils.HumanFy(update.proxyDown));
SpeedDirectDisplay = string.Format("{0}:{1}/s¡ü | {2}/s¡ý", Global.directTag, Utils.HumanFy(update.directUp), Utils.HumanFy(update.directDown));
SpeedProxyDisplay = string.Format("{0}:{1}/s¡ü | {2}/s¡ý", Global.agentTag, Utils.HumanFy(update.proxyUp), Utils.HumanFy(update.proxyDown));
SpeedDirectDisplay = string.Format("{0}:{1}/s¡ü | {2}/s¡ý", Global.directTag, Utils.HumanFy(update.directUp), Utils.HumanFy(update.directDown));
if (update.proxyUp + update.proxyDown > 0)
{
@ -621,6 +621,7 @@ namespace v2rayN.ViewModels
item.speedVal = $"{speed} {Global.SpeedUnit}";
}
_profileItems.Replace(item, Utils.DeepCopy(item));
SelectedProfile = item;
}
}