mirror of
https://github.com/2dust/v2rayN.git
synced 2025-09-11 12:46:31 +00:00
Optimization and improvement
This commit is contained in:
parent
b54c67d6f1
commit
29a5abf4d6
5 changed files with 12 additions and 23 deletions
|
@ -1,10 +1,13 @@
|
|||
using ReactiveUI;
|
||||
using ReactiveUI.Fody.Helpers;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
public class CheckUpdateModel
|
||||
public class CheckUpdateModel : ReactiveObject
|
||||
{
|
||||
public bool? IsSelected { get; set; }
|
||||
public string? CoreType { get; set; }
|
||||
public string? Remarks { get; set; }
|
||||
[Reactive] public string? Remarks { get; set; }
|
||||
public string? FileName { get; set; }
|
||||
public bool? IsFinished { get; set; }
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
using ReactiveUI;
|
||||
using ReactiveUI.Fody.Helpers;
|
||||
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ClashProxyModel
|
||||
public class ClashProxyModel : ReactiveObject
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
|
||||
|
@ -9,9 +12,9 @@ public class ClashProxyModel
|
|||
|
||||
public string? Now { get; set; }
|
||||
|
||||
public int Delay { get; set; }
|
||||
[Reactive] public int Delay { get; set; }
|
||||
|
||||
public string? DelayName { get; set; }
|
||||
[Reactive] public string? DelayName { get; set; }
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
|
|
@ -334,9 +334,6 @@ public class CheckUpdateViewModel : MyReactiveObject
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var itemCopy = JsonUtils.DeepCopy(found);
|
||||
itemCopy.Remarks = model.Remarks;
|
||||
CheckUpdateModels.Replace(found, itemCopy);
|
||||
found.Remarks = model.Remarks;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -391,7 +391,6 @@ public class ClashProxiesViewModel : MyReactiveObject
|
|||
|
||||
public async Task ProxiesDelayTestResult(SpeedTestResult result)
|
||||
{
|
||||
//UpdateHandler(false, $"{item.name}={result}");
|
||||
var detail = ProxyDetails.FirstOrDefault(it => it.Name == result.IndexId);
|
||||
if (detail == null)
|
||||
{
|
||||
|
@ -414,7 +413,6 @@ public class ClashProxiesViewModel : MyReactiveObject
|
|||
detail.Delay = _delayTimeout;
|
||||
detail.DelayName = string.Empty;
|
||||
}
|
||||
ProxyDetails.Replace(detail, JsonUtils.DeepCopy(detail));
|
||||
}
|
||||
|
||||
#endregion proxy function
|
||||
|
|
|
@ -293,7 +293,6 @@ public class ProfilesViewModel : MyReactiveObject
|
|||
{
|
||||
item.SpeedVal = result.Speed ?? string.Empty;
|
||||
}
|
||||
//_profileItems.Replace(item, JsonUtils.DeepCopy(item));
|
||||
}
|
||||
|
||||
public async Task UpdateStatistics(ServerSpeedItem update)
|
||||
|
@ -314,17 +313,6 @@ public class ProfilesViewModel : MyReactiveObject
|
|||
item.TodayUp = Utils.HumanFy(update.TodayUp);
|
||||
item.TotalDown = Utils.HumanFy(update.TotalDown);
|
||||
item.TotalUp = Utils.HumanFy(update.TotalUp);
|
||||
|
||||
//if (SelectedProfile?.IndexId == item.IndexId)
|
||||
//{
|
||||
// var temp = JsonUtils.DeepCopy(item);
|
||||
// _profileItems.Replace(item, temp);
|
||||
// SelectedProfile = temp;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _profileItems.Replace(item, JsonUtils.DeepCopy(item));
|
||||
//}
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
|
Loading…
Reference in a new issue