viewer icon indicating copy to clipboard operation
viewer copied to clipboard

Alphabetic sorting in Viewer is wrong with numbers

Open jancborchardt opened this issue 5 years ago • 4 comments

Related to Slideshow viewer not adapting sorting mode of files app #366 but different.

If you have these Files:

  • 1.jpg
  • 2.jpg
  • …
  • 9.jpg
  • 10.jpg
  • 11.jpg

And then you open 1.jpg to start going through them, the Viewer will show them in this order:

  • 1.jpg
  • 10.jpg
  • 11.jpg
  • 2.jpg
  • …
  • 9.jpg

Of course it should be the same order as in Files, the "human" order to sort numbers. ;)

@skjnldsv if you point out where this would have to be changed, this could be a good first issue?

jancborchardt avatar Jul 24 '20 12:07 jancborchardt

https://github.com/nextcloud/viewer/blob/8eafdcabec17a295ea6a9626f171c08340fb99f3/src/views/Viewer.vue#L365-L367

skjnldsv avatar Jul 26 '20 10:07 skjnldsv

https://github.com/nextcloud/viewer/blob/8eafdcabec17a295ea6a9626f171c08340fb99f3/src/utils/fileUtils.js#L64-L88

skjnldsv avatar Jul 26 '20 10:07 skjnldsv

Related https://github.com/nextcloud/server/issues/13661

skjnldsv avatar Aug 27 '20 13:08 skjnldsv

Just experienced this issue - is there any update on it?

My files are ordered like this:

  • Image 01.jpg
  • Image 02.jpg
  • ...

The viewer displays them in the wrong order:

  1. Image 01.jpg
  2. Image 010.jpg
  3. Image 011.jpg
  4. ...

florianwgnr avatar Aug 04 '22 15:08 florianwgnr

Still an unsolved issue

Snake16547 avatar Jan 14 '23 21:01 Snake16547