最小化图标设置中的服务器最多显示20个,不会隐藏

This commit is contained in:
rexmyl 2023-06-02 21:44:11 +08:00
parent 325d91621c
commit 1fb1805956

View file

@ -14,6 +14,7 @@ using System.Reactive;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Text; using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Media; using System.Windows.Media;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Handler; using v2rayN.Handler;
@ -958,7 +959,19 @@ namespace v2rayN.ViewModels
_servers.Clear(); _servers.Clear();
if (_lstProfile.Count > _config.guiItem.trayMenuServersLimit) if (_lstProfile.Count > _config.guiItem.trayMenuServersLimit)
{ {
BlServers = false; BlServers = true;
for (int k = 0; k < _config.guiItem.trayMenuServersLimit; k++)
{
ProfileItem it = _lstProfile[k];
string name = it.GetSummary();
var item = new ComboItem() { ID = it.indexId, Text = name };
_servers.Add(item);
if (_config.indexId == it.indexId)
{
SelectedServer = item;
}
}
return; return;
} }