Rename from ActionAsync to AsyncAction

This commit is contained in:
Hongtao Zhang 2022-04-15 18:32:05 -05:00
parent 3f08dfca9a
commit de1b0a23c6
4 changed files with 6 additions and 6 deletions

View file

@ -115,7 +115,7 @@ namespace Flow.Launcher.Core.Plugin
foreach (var result in queryResponseModel.Result)
{
result.ActionAsync = async c =>
result.AsyncAction = async c =>
{
UpdateSettings(result.SettingsChange);

View file

@ -92,7 +92,7 @@ namespace Flow.Launcher.Plugin
/// true to hide flowlauncher after select result
/// </returns>
/// </summary>
public Func<ActionContext, ValueTask<bool>> ActionAsync { get; set; }
public Func<ActionContext, ValueTask<bool>> AsyncAction { get; set; }
/// <summary>
/// Priority of the current result
@ -181,7 +181,7 @@ namespace Flow.Launcher.Plugin
public ValueTask<bool> ExecuteAsync(ActionContext context)
{
return ActionAsync?.Invoke(context) ?? ValueTask.FromResult(Action?.Invoke(context) ?? false);
return AsyncAction?.Invoke(context) ?? ValueTask.FromResult(Action?.Invoke(context) ?? false);
}
}
}

View file

@ -48,7 +48,7 @@ namespace Flow.Launcher.Test.Plugins
foreach (var result in results)
{
Assert.IsNotNull(result);
Assert.IsNotNull(result.ActionAsync);
Assert.IsNotNull(result.AsyncAction);
Assert.IsNotNull(result.Title);
}
@ -92,7 +92,7 @@ namespace Flow.Launcher.Test.Plugins
Assert.AreEqual(result1, referenceResult);
Assert.IsNotNull(result1);
Assert.IsNotNull(result1.ActionAsync);
Assert.IsNotNull(result1.AsyncAction);
}
}

View file

@ -86,7 +86,7 @@
Height="32"
Margin="0,0,0,0"
HorizontalAlignment="Center"
Source="{Binding Image}"
Source="{Binding Image, TargetNullValue={x:Null}}"
Stretch="Uniform"
Visibility="{Binding ShowIcon}" />
</Border>