Skip to content

Commit 1747a64

Browse files
committed
Explorer plugin native context menu: move native context menu below all other items
1 parent adebabd commit 1747a64

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -167,24 +167,6 @@ public List<Result> LoadContextMenus(Result selectedResult)
167167
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uf12b")
168168
});
169169

170-
if (record.Type is ResultType.File or ResultType.Folder)
171-
{
172-
var menuItems = ShellContextMenuDisplayHelper.GetContextMenuWithIcons(record.FullPath);
173-
foreach (var menuItem in menuItems)
174-
{
175-
contextMenus.Add(new Result
176-
{
177-
Title = menuItem.Label,
178-
Icon = () => menuItem.Icon,
179-
Action = _ =>
180-
{
181-
ShellContextMenuDisplayHelper.ExecuteContextMenuItem(record.FullPath, menuItem.CommandId);
182-
return true;
183-
}
184-
});
185-
}
186-
}
187-
188170

189171
if (record.Type is ResultType.File or ResultType.Folder)
190172
contextMenus.Add(new Result
@@ -297,6 +279,24 @@ public List<Result> LoadContextMenus(Result selectedResult)
297279
},
298280
IcoPath = Constants.DifferentUserIconImagePath
299281
});
282+
283+
if (record.Type is ResultType.File or ResultType.Folder)
284+
{
285+
var menuItems = ShellContextMenuDisplayHelper.GetContextMenuWithIcons(record.FullPath);
286+
foreach (var menuItem in menuItems)
287+
{
288+
contextMenus.Add(new Result
289+
{
290+
Title = menuItem.Label,
291+
Icon = () => menuItem.Icon,
292+
Action = _ =>
293+
{
294+
ShellContextMenuDisplayHelper.ExecuteContextMenuItem(record.FullPath, menuItem.CommandId);
295+
return true;
296+
}
297+
});
298+
}
299+
}
300300
}
301301

302302
return contextMenus;

0 commit comments

Comments
 (0)