From 1747a64d6bea9a8a0ee13e870e03c7ee5892f9e3 Mon Sep 17 00:00:00 2001 From: Yusyuriv Date: Fri, 7 Jun 2024 13:34:48 +0600 Subject: [PATCH] Explorer plugin native context menu: move native context menu below all other items --- .../ContextMenu.cs | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs index 519ff991b..b0d392f1b 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/ContextMenu.cs @@ -167,24 +167,6 @@ namespace Flow.Launcher.Plugin.Explorer Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uf12b") }); - if (record.Type is ResultType.File or ResultType.Folder) - { - var menuItems = ShellContextMenuDisplayHelper.GetContextMenuWithIcons(record.FullPath); - foreach (var menuItem in menuItems) - { - contextMenus.Add(new Result - { - Title = menuItem.Label, - Icon = () => menuItem.Icon, - Action = _ => - { - ShellContextMenuDisplayHelper.ExecuteContextMenuItem(record.FullPath, menuItem.CommandId); - return true; - } - }); - } - } - if (record.Type is ResultType.File or ResultType.Folder) contextMenus.Add(new Result @@ -297,6 +279,24 @@ namespace Flow.Launcher.Plugin.Explorer }, IcoPath = Constants.DifferentUserIconImagePath }); + + if (record.Type is ResultType.File or ResultType.Folder) + { + var menuItems = ShellContextMenuDisplayHelper.GetContextMenuWithIcons(record.FullPath); + foreach (var menuItem in menuItems) + { + contextMenus.Add(new Result + { + Title = menuItem.Label, + Icon = () => menuItem.Icon, + Action = _ => + { + ShellContextMenuDisplayHelper.ExecuteContextMenuItem(record.FullPath, menuItem.CommandId); + return true; + } + }); + } + } } return contextMenus;