Closed luckman212 closed 3 years ago
Which one should be shown? Should it show the first one that matches? Or the one that matches most specifically (ie by matching the most rules)? Or another filter method?
I think they should all be shown, but filtered so that exact duplicate actions (e.g. identical App bundle or script path) should only show a single result.
Indeed, but I was asking which duplicate(s) should be omitted and which single instance should be shown? That will affect the placement of the item in the menu. In your example would you expect to see:
Sublime Text TextEdit Xcode
or
TextEdit Xcode Sublime Text
This would be more pronounced the longer the menu list as you would expect to see an item in a certain place every time.
Also, if you have an app/script in the 'Any' rule wouldn't it just be easier to not add it to any other more specific rules?
I'm imagining programmatically it would be easier to skip the duplicate items when building the array of menuitems, rather than remove the previous entries and reinsert them at the end. So it would be
Sublime Text TextEdit Xcode
And yes—you're right about just not adding the "Any" items to the other categories as a partial solution. I realized that some time after my original post, just forgot to comment.
Thanks for this suggestion! Duplicates will be removed in version 2020.9
, coming soon to the Mac App Store.
The order of menu items is determined by the order of Rules/Items in the UI. This change keeps the first exact-duplicate Item and hides the rest.
Old:
New:
Love it!
Very fast Mac App Store review. This is now released in v2020.9 🚀
I have Sublime Text registered as an item for Text as well as Any:
This causes it to appear twice in the SS menu:
It would be good for items to be de-duped before the menu is rendered if they are identical.