File tree Expand file tree Collapse file tree 5 files changed +12
-23
lines changed Expand file tree Collapse file tree 5 files changed +12
-23
lines changed Original file line number Diff line number Diff line change
1
+ using ReactiveUI ;
2
+ using ReactiveUI . Fody . Helpers ;
3
+
1
4
namespace ServiceLib . Models ;
2
5
3
- public class CheckUpdateModel
6
+ public class CheckUpdateModel : ReactiveObject
4
7
{
5
8
public bool ? IsSelected { get ; set ; }
6
9
public string ? CoreType { get ; set ; }
7
- public string ? Remarks { get ; set ; }
10
+ [ Reactive ] public string ? Remarks { get ; set ; }
8
11
public string ? FileName { get ; set ; }
9
12
public bool ? IsFinished { get ; set ; }
10
13
}
Original file line number Diff line number Diff line change
1
+ using ReactiveUI ;
2
+ using ReactiveUI . Fody . Helpers ;
3
+
1
4
namespace ServiceLib . Models ;
2
5
3
6
[ Serializable ]
4
- public class ClashProxyModel
7
+ public class ClashProxyModel : ReactiveObject
5
8
{
6
9
public string ? Name { get ; set ; }
7
10
8
11
public string ? Type { get ; set ; }
9
12
10
13
public string ? Now { get ; set ; }
11
14
12
- public int Delay { get ; set ; }
15
+ [ Reactive ] public int Delay { get ; set ; }
13
16
14
- public string ? DelayName { get ; set ; }
17
+ [ Reactive ] public string ? DelayName { get ; set ; }
15
18
16
19
public bool IsActive { get ; set ; }
17
20
}
Original file line number Diff line number Diff line change @@ -334,9 +334,6 @@ public async Task UpdateViewResult(CheckUpdateModel model)
334
334
{
335
335
return ;
336
336
}
337
-
338
- var itemCopy = JsonUtils . DeepCopy ( found ) ;
339
- itemCopy . Remarks = model . Remarks ;
340
- CheckUpdateModels . Replace ( found , itemCopy ) ;
337
+ found . Remarks = model . Remarks ;
341
338
}
342
339
}
Original file line number Diff line number Diff line change @@ -391,7 +391,6 @@ private async Task ProxiesDelayTest(bool blAll = true)
391
391
392
392
public async Task ProxiesDelayTestResult ( SpeedTestResult result )
393
393
{
394
- //UpdateHandler(false, $"{item.name}={result}");
395
394
var detail = ProxyDetails . FirstOrDefault ( it => it . Name == result . IndexId ) ;
396
395
if ( detail == null )
397
396
{
@@ -414,7 +413,6 @@ public async Task ProxiesDelayTestResult(SpeedTestResult result)
414
413
detail . Delay = _delayTimeout ;
415
414
detail . DelayName = string . Empty ;
416
415
}
417
- ProxyDetails . Replace ( detail , JsonUtils . DeepCopy ( detail ) ) ;
418
416
}
419
417
420
418
#endregion proxy function
Original file line number Diff line number Diff line change @@ -293,7 +293,6 @@ public async Task SetSpeedTestResult(SpeedTestResult result)
293
293
{
294
294
item . SpeedVal = result . Speed ?? string . Empty ;
295
295
}
296
- //_profileItems.Replace(item, JsonUtils.DeepCopy(item));
297
296
}
298
297
299
298
public async Task UpdateStatistics ( ServerSpeedItem update )
@@ -314,17 +313,6 @@ public async Task UpdateStatistics(ServerSpeedItem update)
314
313
item . TodayUp = Utils . HumanFy ( update . TodayUp ) ;
315
314
item . TotalDown = Utils . HumanFy ( update . TotalDown ) ;
316
315
item . TotalUp = Utils . HumanFy ( update . TotalUp ) ;
317
-
318
- //if (SelectedProfile?.IndexId == item.IndexId)
319
- //{
320
- // var temp = JsonUtils.DeepCopy(item);
321
- // _profileItems.Replace(item, temp);
322
- // SelectedProfile = temp;
323
- //}
324
- //else
325
- //{
326
- // _profileItems.Replace(item, JsonUtils.DeepCopy(item));
327
- //}
328
316
}
329
317
}
330
318
catch
You can’t perform that action at this time.
0 commit comments