Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Inconsistent Volume order #21

Closed
huwjeffries opened this issue Feb 19, 2022 · 2 comments
Closed

Inconsistent Volume order #21

huwjeffries opened this issue Feb 19, 2022 · 2 comments

Comments

@huwjeffries
Copy link

Sorry - another minor bug + suggested fix. In the demos, highlight Volume 2. Press refresh. The volumes are listed as:
Volume 2
Volume 0
Volume 1
Volume 3
Volume 4
Go into a subfolder under Volume 2 and press refresh. The volumes are listed as:
Volume 0
Volume 1
Volume 2
-> Subfolder
Volume 3
Volume 4

The simplest fix would be to add an OrderBy on line 169 of Connector.cs:
openResp.files = openResp.files.OrderBy(f => (f as BaseInfoResponse)?.name ?? string.Empty).ToList();
And make the files property setter public. There may be a more elegant place to put this with a bit of refactoring.
Thanks.

@trannamtrung1st
Copy link
Owner

Hi @huwjeffries, good catch. Just fixed this issue in patch 1.4.1. Check it out.

@trannamtrung1st
Copy link
Owner

I didn't use OrderBy to maintain the original order of the Volumes list passed to the Connector. Therefore we can have a custom order if we want.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants