From 9c9fde2245b24ed0a72cf46907cc32d94c1924ab Mon Sep 17 00:00:00 2001 From: Madison Konig Date: Fri, 13 Sep 2024 22:28:14 -0700 Subject: [PATCH] Fix "open with" list ordering (#2697) * Add sorting to "open with" menu * Added sorting of open with in rust * made prettier * reduced variables used * format issues * revert rust back to no sorting --- interface/app/$libraryId/Explorer/ContextMenu/OpenWith.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interface/app/$libraryId/Explorer/ContextMenu/OpenWith.tsx b/interface/app/$libraryId/Explorer/ContextMenu/OpenWith.tsx index 83d4024db..381548a0a 100644 --- a/interface/app/$libraryId/Explorer/ContextMenu/OpenWith.tsx +++ b/interface/app/$libraryId/Explorer/ContextMenu/OpenWith.tsx @@ -100,7 +100,9 @@ const Items = ({ paths.length > 0 ? actions.getEphemeralFilesOpenWithApps(paths).then(handleError) : Promise.resolve([]) - ]).then((res) => res.flat()); + ]) + .then((res) => res.flat()) + .then((res) => res.sort((a, b) => a.name.localeCompare(b.name))); }, { initialData: [] } );