mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 17:11:31 +08:00
Update On Fri Aug 23 20:31:50 CEST 2024
This commit is contained in:
@@ -27,7 +27,7 @@ namespace ServiceLib.ViewModels
|
||||
|
||||
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
||||
|
||||
public RoutingRuleDetailsViewModel(RulesItem rulesItem, Func<EViewAction, object?, bool>? updateView)
|
||||
public RoutingRuleDetailsViewModel(RulesItem rulesItem, Func<EViewAction, object?, Task<bool>>? updateView)
|
||||
{
|
||||
_config = LazyConfig.Instance.Config;
|
||||
_noticeHandler = Locator.Current.GetService<NoticeHandler>();
|
||||
@@ -51,11 +51,11 @@ namespace ServiceLib.ViewModels
|
||||
|
||||
SaveCmd = ReactiveCommand.Create(() =>
|
||||
{
|
||||
SaveRules();
|
||||
SaveRulesAsync();
|
||||
});
|
||||
}
|
||||
|
||||
private void SaveRules()
|
||||
private async Task SaveRulesAsync()
|
||||
{
|
||||
Domain = Utils.Convert2Comma(Domain);
|
||||
IP = Utils.Convert2Comma(IP);
|
||||
@@ -88,7 +88,7 @@ namespace ServiceLib.ViewModels
|
||||
return;
|
||||
}
|
||||
//_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
||||
_updateView?.Invoke(EViewAction.CloseWindow, null);
|
||||
await _updateView?.Invoke(EViewAction.CloseWindow, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user