mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-16 10:14:59 +03:00
Code clean (#9482)
This commit is contained in:
@@ -69,7 +69,7 @@ public class ClashConnectionsViewModel : MyReactiveObject
|
||||
|
||||
var dtNow = DateTime.Now;
|
||||
var lstModel = new List<ClashConnectionModel>();
|
||||
foreach (var item in connections ?? new())
|
||||
foreach (var item in connections ?? [])
|
||||
{
|
||||
var host = $"{(item.metadata.host.IsNullOrEmpty() ? item.metadata.destinationIP : item.metadata.host)}:{item.metadata.destinationPort}";
|
||||
if (HostFilter.IsNotEmpty() && !host.Contains(HostFilter))
|
||||
@@ -85,7 +85,7 @@ public class ClashConnectionsViewModel : MyReactiveObject
|
||||
Host = host,
|
||||
Time = (dtNow - item.start).TotalSeconds < 0 ? 1 : (dtNow - item.start).TotalSeconds,
|
||||
Elapsed = (dtNow - item.start).ToString(@"hh\:mm\:ss"),
|
||||
Chain = $"{item.rule} , {string.Join("->", item.chains ?? new())}"
|
||||
Chain = $"{item.rule} , {string.Join("->", item.chains ?? [])}"
|
||||
};
|
||||
|
||||
lstModel.Add(model);
|
||||
|
||||
Reference in New Issue
Block a user