mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-09 22:15:00 +03:00
Rename ProfileItems to ProfileModels and refactor
This commit is contained in:
@@ -49,12 +49,15 @@ public class AddServerViewModel : MyReactiveObject
|
||||
|
||||
[Reactive]
|
||||
public string WgPublicKey { get; set; }
|
||||
|
||||
//[Reactive]
|
||||
//public string WgPresharedKey { get; set; }
|
||||
[Reactive]
|
||||
public string WgInterfaceAddress { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string WgReserved { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int WgMtu { get; set; }
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ public class ProfilesSelectViewModel : MyReactiveObject
|
||||
|
||||
private async Task<List<ProfileItemModel>?> GetProfileItemsEx(string subid, string filter)
|
||||
{
|
||||
var lstModel = await AppManager.Instance.ProfileItems(_subIndexId, filter);
|
||||
var lstModel = await AppManager.Instance.ProfileModels(_subIndexId, filter);
|
||||
lstModel = (from t in lstModel
|
||||
select new ProfileItemModel
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ProfilesViewModel : MyReactiveObject
|
||||
|
||||
public ReactiveCommand<Unit, Unit> MoveUpCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> MoveDownCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> MoveBottomCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> MoveBottomCmd { get; }
|
||||
public ReactiveCommand<SubItem, Unit> MoveToGroupCmd { get; }
|
||||
|
||||
//servers ping
|
||||
@@ -428,7 +428,7 @@ public class ProfilesViewModel : MyReactiveObject
|
||||
|
||||
private async Task<List<ProfileItemModel>?> GetProfileItemsEx(string subid, string filter)
|
||||
{
|
||||
var lstModel = await AppManager.Instance.ProfileItems(_config.SubIndexId, filter);
|
||||
var lstModel = await AppManager.Instance.ProfileModels(_config.SubIndexId, filter);
|
||||
|
||||
await ConfigHandler.SetDefaultServer(_config, lstModel);
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ public class StatusBarViewModel : MyReactiveObject
|
||||
|
||||
private async Task RefreshServersMenu()
|
||||
{
|
||||
var lstModel = await AppManager.Instance.ProfileItems(_config.SubIndexId, "");
|
||||
var lstModel = await AppManager.Instance.ProfileModels(_config.SubIndexId, "");
|
||||
|
||||
Servers.Clear();
|
||||
if (lstModel.Count > _config.GuiItem.TrayMenuServersLimit)
|
||||
@@ -315,7 +315,7 @@ public class StatusBarViewModel : MyReactiveObject
|
||||
BlServers = true;
|
||||
for (var k = 0; k < lstModel.Count; k++)
|
||||
{
|
||||
ProfileItem it = lstModel[k];
|
||||
var it = lstModel[k];
|
||||
var name = it.GetSummary();
|
||||
|
||||
var item = new ComboItem() { ID = it.IndexId, Text = name };
|
||||
|
||||
Reference in New Issue
Block a user