https://github.com/2dust/v2rayN/issues/9593
This commit is contained in:
2dust
2026-06-26 10:18:02 +08:00
parent 8d94997ba0
commit 7100b3f0a5
7 changed files with 42 additions and 41 deletions

View File

@@ -161,19 +161,17 @@ public class ProfilesSelectViewModel : MyReactiveObject
await _updateView?.Invoke(EViewAction.DispatcherRefreshServersBiz, null);
}
public async Task RefreshSubscriptions()
private async Task RefreshSubscriptions()
{
var subItems = await AppManager.Instance.SubItems();
subItems.Insert(0, new SubItem { Remarks = ResUI.AllGroupServers });
SubItems.Clear();
SubItems.AddRange(subItems);
SubItems.Add(new SubItem { Remarks = ResUI.AllGroupServers });
foreach (var item in await AppManager.Instance.SubItems())
{
SubItems.Add(item);
}
SelectedSub = (_config.SubIndexId.IsNotEmpty()
? SubItems.FirstOrDefault(t => t.Id == _config.SubIndexId)
: null) ?? SubItems.FirstOrDefault();
? subItems.FirstOrDefault(t => t.Id == _config.SubIndexId)
: null) ?? subItems.FirstOrDefault();
}
private async Task<List<ProfileItemModel>?> GetProfileItemsEx(string subid, string filter)