Skip to content
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

feat: sort the peripherals list #16

Merged
merged 5 commits into from
Nov 26, 2023
Merged

Conversation

dzamlo
Copy link
Contributor

@dzamlo dzamlo commented Nov 23, 2023

This prevents the list content to jump around, making it simpler to select a peripheral.

sort_by is used instead of sort_by_key because it seems not possible to use the latter with Strings.

This prevents the list content to jump around, making it simpler to
select a peripheral.

`sort_by` is used instead of `sort_by_key` because it seems not possible
to use the latter with `String`s.
Copy link
Owner

@dmtrKovalenko dmtrKovalenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect this to be an option that you can turn on and off, people are more used to sort by rssi (which is default sorting comes from blte plug)

@dzamlo
Copy link
Contributor Author

dzamlo commented Nov 23, 2023

Ok, I will work on making this an option.

@dzamlo
Copy link
Contributor Author

dzamlo commented Nov 23, 2023

I made the change

Make sort enum and share it with other views that we want to search
Copy link
Owner

@dmtrKovalenko dmtrKovalenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved :D

@dmtrKovalenko dmtrKovalenko merged commit 36db4e2 into dmtrKovalenko:main Nov 26, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants