mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Prefer injected Context over static Main.Context
This commit is contained in:
parent
39de484d2d
commit
44b25b487a
1 changed files with 2 additions and 4 deletions
|
|
@ -347,8 +347,6 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Result CreateOpenWithEditorResult(SearchResult record, string editorPath)
|
||||
{
|
||||
var name = $"{Context.API.GetTranslation("plugin_explorer_openwitheditor")} {Path.GetFileNameWithoutExtension(editorPath)}";
|
||||
|
|
@ -360,7 +358,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
{
|
||||
try
|
||||
{
|
||||
Main.Context.API.StartProcess(editorPath, arguments: record.FullPath);
|
||||
Context.API.StartProcess(editorPath, arguments: record.FullPath);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
@ -390,7 +388,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
{
|
||||
try
|
||||
{
|
||||
Main.Context.API.StartProcess(shellPath, workingDirectory: record.FullPath, arguments: string.Empty);
|
||||
Context.API.StartProcess(shellPath, workingDirectory: record.FullPath, arguments: string.Empty);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue