Skip to content

Commit de1b0a2

Browse files
committed
Rename from ActionAsync to AsyncAction
1 parent 3f08dfc commit de1b0a2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private List<Result> ParseResults(JsonRPCQueryResponseModel queryResponseModel)
115115

116116
foreach (var result in queryResponseModel.Result)
117117
{
118-
result.ActionAsync = async c =>
118+
result.AsyncAction = async c =>
119119
{
120120
UpdateSettings(result.SettingsChange);
121121

Flow.Launcher.Plugin/Result.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public string IcoPath
9292
/// true to hide flowlauncher after select result
9393
/// </returns>
9494
/// </summary>
95-
public Func<ActionContext, ValueTask<bool>> ActionAsync { get; set; }
95+
public Func<ActionContext, ValueTask<bool>> AsyncAction { get; set; }
9696

9797
/// <summary>
9898
/// Priority of the current result
@@ -181,7 +181,7 @@ public override string ToString()
181181

182182
public ValueTask<bool> ExecuteAsync(ActionContext context)
183183
{
184-
return ActionAsync?.Invoke(context) ?? ValueTask.FromResult(Action?.Invoke(context) ?? false);
184+
return AsyncAction?.Invoke(context) ?? ValueTask.FromResult(Action?.Invoke(context) ?? false);
185185
}
186186
}
187187
}

Flow.Launcher.Test/Plugins/JsonRPCPluginTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task GivenVariousJsonText_WhenVariousNamingCase_ThenExpectNotNullRe
4848
foreach (var result in results)
4949
{
5050
Assert.IsNotNull(result);
51-
Assert.IsNotNull(result.ActionAsync);
51+
Assert.IsNotNull(result.AsyncAction);
5252
Assert.IsNotNull(result.Title);
5353
}
5454

@@ -92,7 +92,7 @@ public async Task GivenModel_WhenSerializeWithDifferentNamingPolicy_ThenExpectSa
9292
Assert.AreEqual(result1, referenceResult);
9393

9494
Assert.IsNotNull(result1);
95-
Assert.IsNotNull(result1.ActionAsync);
95+
Assert.IsNotNull(result1.AsyncAction);
9696
}
9797
}
9898

Flow.Launcher/ResultListBox.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
Height="32"
8787
Margin="0,0,0,0"
8888
HorizontalAlignment="Center"
89-
Source="{Binding Image}"
89+
Source="{Binding Image, TargetNullValue={x:Null}}"
9090
Stretch="Uniform"
9191
Visibility="{Binding ShowIcon}" />
9292
</Border>

0 commit comments

Comments
 (0)