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

Fix unstable table sort #2210

Merged
merged 1 commit into from
Oct 7, 2021
Merged

Conversation

TrimmingFool
Copy link
Contributor

Bug: The table sorting is not consistent if there are more than one torrent with the same name.

  • Have two rows with identical torrent names
  • Clicking on one row -> triggers resorting
  • The sort swaps the two rows and the non-clicked row is selected

I just added a ternary sorting by the torrent hash.

@Novik
Copy link
Owner

Novik commented Oct 7, 2021

Thanks.
We have here abstract table with abstract keys. I.e. key may be Number, for example.
For numbers call of localeCompare function will raise an error.
I think, you should call theSort.AlphaNumeric(x.key,y.key) or theSort.Default(x.key,y.key) instead x.key.localeCompare(y.key) here.
Correct this, please.

@TrimmingFool TrimmingFool force-pushed the fix-unstable-table-sort branch from b79a3fa to 0ea93d4 Compare October 7, 2021 14:18
@Novik Novik merged commit b9a598e into Novik:master Oct 7, 2021
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