mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-09 22:15:00 +03:00
Refine reload logic after RefreshServers
https://github.com/2dust/v2rayN/issues/9344
This commit is contained in:
@@ -304,10 +304,22 @@ public class MainWindowViewModel : MyReactiveObject
|
|||||||
{
|
{
|
||||||
var indexIdOld = _config.IndexId;
|
var indexIdOld = _config.IndexId;
|
||||||
await RefreshServers();
|
await RefreshServers();
|
||||||
if (indexIdOld != _config.IndexId)
|
|
||||||
|
// If indexId changed or subIndexId is empty, directly reload.
|
||||||
|
if (indexIdOld != _config.IndexId || _config.SubIndexId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
await Reload();
|
await Reload();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// The activity config belongs to the current group.
|
||||||
|
var profile = await AppManager.Instance.GetProfileItem(_config.IndexId);
|
||||||
|
if (profile != null && profile.Subid == _config.SubIndexId)
|
||||||
|
{
|
||||||
|
await Reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_config.UiItem.EnableAutoAdjustMainLvColWidth)
|
if (_config.UiItem.EnableAutoAdjustMainLvColWidth)
|
||||||
{
|
{
|
||||||
AppEvents.AdjustMainLvColWidthRequested.Publish();
|
AppEvents.AdjustMainLvColWidthRequested.Publish();
|
||||||
|
|||||||
Reference in New Issue
Block a user