mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix Don'tHideAfterAction logic for JsonRPCPlugin.cs
This commit is contained in:
parent
a5f5c091be
commit
aa3e7decd8
1 changed files with 24 additions and 17 deletions
|
|
@ -84,27 +84,34 @@ namespace Flow.Launcher.Core.Plugin
|
||||||
{
|
{
|
||||||
if (result.JsonRPCAction == null) return false;
|
if (result.JsonRPCAction == null) return false;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(result.JsonRPCAction.Method))
|
if (string.IsNullOrEmpty(result.JsonRPCAction.Method))
|
||||||
{
|
{
|
||||||
if (result.JsonRPCAction.Method.StartsWith("Flow.Launcher."))
|
return !result.JsonRPCAction.DontHideAfterAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.JsonRPCAction.Method.StartsWith("Flow.Launcher."))
|
||||||
|
{
|
||||||
|
ExecuteFlowLauncherAPI(result.JsonRPCAction.Method[14..],
|
||||||
|
result.JsonRPCAction.Parameters);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var actionResponse = ExecuteCallback(result.JsonRPCAction);
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(actionResponse))
|
||||||
{
|
{
|
||||||
ExecuteFlowLauncherAPI(result.JsonRPCAction.Method[14..],
|
return !result.JsonRPCAction.DontHideAfterAction;
|
||||||
result.JsonRPCAction.Parameters);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
JsonRPCRequestModel jsonRpcRequestModel =
|
||||||
|
JsonSerializer.Deserialize<JsonRPCRequestModel>(actionResponse);
|
||||||
|
|
||||||
|
if (jsonRpcRequestModel != null
|
||||||
|
&& !string.IsNullOrEmpty(jsonRpcRequestModel.Method)
|
||||||
|
&& jsonRpcRequestModel.Method.StartsWith("Flow.Launcher."))
|
||||||
{
|
{
|
||||||
string actionReponse = ExecuteCallback(result.JsonRPCAction);
|
ExecuteFlowLauncherAPI(jsonRpcRequestModel.Method.Substring(4),
|
||||||
if (string.IsNullOrEmpty(actionReponse))
|
jsonRpcRequestModel.Parameters);
|
||||||
return false;
|
|
||||||
JsonRPCRequestModel jsonRpcRequestModel =
|
|
||||||
JsonSerializer.Deserialize<JsonRPCRequestModel>(actionReponse);
|
|
||||||
if (jsonRpcRequestModel != null
|
|
||||||
&& !string.IsNullOrEmpty(jsonRpcRequestModel.Method)
|
|
||||||
&& jsonRpcRequestModel.Method.StartsWith("Flow.Launcher."))
|
|
||||||
{
|
|
||||||
ExecuteFlowLauncherAPI(jsonRpcRequestModel.Method.Substring(4),
|
|
||||||
jsonRpcRequestModel.Parameters);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue