-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort list of external players #4036
Sort list of external players #4036
Conversation
Actually I just realized, this would also potentially break the setting for a user anytime a new player is added, so the way the setting is saved needs to be reworked. I'll turn this into a draft for now. |
Pull request was converted to draft
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of leaving None in the list while sorting and then correcting the position afterwards, removing it from the list, sorting and then adding it back might save you a bit of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also to answer your comment about it breaking the setting, it's because you are only changing the order of the names but not reordering the values to match
so instead of it being vlc -> vlc, it might now be smplayer -> vlc
src/renderer/components/external-player-settings/external-player-settings.js
Outdated
Show resolved
Hide resolved
If you do the sorting in |
All excellent suggestions, thank you. I had already realized the value issue, but doing it in utils.js instead was clearly the better choice to begin with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* development: Translated using Weblate (Chinese (Simplified)) Translated using Weblate (Polish) Translated using Weblate (Czech) Translated using Weblate (Turkish) Translated using Weblate (French) Translated using Weblate (German) Fix localization of counts (FreeTubeApp#4011) Sort list of external players (FreeTubeApp#4036) Translated using Weblate (French) Translated using Weblate (Icelandic) Translated using Weblate (Estonian) Translated using Weblate (Chinese (Traditional)) Translated using Weblate (Italian)
Sort list of external players
Pull Request Type
Related issue
Description
As more players get added, the list should be sorted for better UX. This PR sorts the elements before display and keeps the default entry for no external player at the top.
Screenshots
Testing
Has been checked by opening the settings and it works as designed.
Desktop