mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
format QueryForPlugin code
This commit is contained in:
parent
c129b7b034
commit
63a9e03d89
1 changed files with 3 additions and 3 deletions
|
|
@ -176,8 +176,8 @@ namespace Flow.Launcher.Core.Plugin
|
|||
async () => results = await plugin.QueryAsync(query, token).ConfigureAwait(false));
|
||||
break;
|
||||
case IPlugin plugin:
|
||||
await Task.Run(() => milliseconds = Stopwatch.Debug($"|PluginManager.QueryForPlugin|Cost for {metadata.Name}", () =>
|
||||
results = plugin.Query(query)), token).ConfigureAwait(false);
|
||||
await Task.Run(() => milliseconds = Stopwatch.Debug($"|PluginManager.QueryForPlugin|Cost for {metadata.Name}",
|
||||
() => results = plugin.Query(query)), token).ConfigureAwait(false);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
|
|
@ -192,6 +192,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// null will be fine since the results will only be added into queue if the token hasn't been cancelled
|
||||
return results = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
@ -199,7 +200,6 @@ namespace Flow.Launcher.Core.Plugin
|
|||
Log.Exception($"|PluginManager.QueryForPlugin|Exception for plugin <{pair.Metadata.Name}> when query <{query}>", e);
|
||||
}
|
||||
|
||||
// null will be fine since the results will only be added into queue if the token hasn't been cancelled
|
||||
return results;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue