I just discovered that the sort order is somehow unexpected, i.e. it is somewhat ascendingly but not strict.
To me this is important because I sort my photos in folders which are intentionally named with this f ormat: YYYYMMDD_nameofevent. If the day is unknown I leave it away or choose e.g. XX. That's actually how I discoverd this.
The sort order should be strictly alphabetical (if chosen to be so in the app's settings).

In contrast if you login to the server (using e.g. ssh) and ls -l the same directory the sort order will be as expected:
# ls -l
total 12
-rw-r--r-- 1 www-data www-data 1 Jul 22 19:57 20180721.txt
-rw-r--r-- 1 www-data www-data 1 Jul 22 19:57 20190720.txt
-rw-r--r-- 1 www-data www-data 1 Jul 22 19:57 2020.txt
Android version: 9.0
Device model: Samsung Galaxy A3 2017
Stock or customized system: Lineageos 16.0
Nextcloud app version: 3.7.0
Nextcloud server version: 15.0.10
@raha just to make sure to understand this. The screenshot you posted is actually the webUI not the Android app.
If so please open an issue on the server repository.
Hi! Yes you are right, but it is actually the same within the app, see screenshot:

Android is doing it the same way as server.
In fact we also use the same test scenarios.
I'll move this into server repo and if this needs to be changed, I'll then create an isssue (again) on Android.
My guess: it is an alphanumeric sorting and the 2020 < 20180721 < 20190720 (these are numbers not dates!)
From this point of view the sort order is correct but these are neither numbers nor dates, these are filenames of a filesystem. And IMHO the 3rd character '2' of 2020 is clearly behind '1' in any character table.
However, I'm still not sure if this is intended as it is now. At least to me this totally disturbing and I think most other people won't expect that.
Yeah, We should sort them as string
@tobiasKaminsky don't forget the labels please :pray: :wink:
We should sort them as string
But how do we know the difference? When do we sort them as strings and when do we sort them as numbers?
But how do we know the difference? When do we sort them as strings and when do we sort them as numbers?
I meant, always sort them as string. 1, 123, 2018, 354896516, 40, 9 instead of 1, 9, 40, 123, 2018, 354896516
EDIT: hum, my file browsers does not sort them like that actually.
We should maybe be consistent across what already exists. (thunar, pcmanfm...)
I think it is not a good idea to revert everything back to plain string sorting.
We have this alphanumeric compare system which works for most cases quite good.
Mixing different "date" formats/schemes will always result in a weird scenario.
Imagine:
2019-08-10.jpg
20190810.jpg
which is for a human exactly the same date representation, but computer cannot sort them next to each other…
So for the first example:
2020.txt
20180721.txt
20190720.txt
change 2020 to be 2020101.txt or "unknown file in 2020.txt"…
Yes, I agree.
I think we should close then :)
So why not simple add an option that the user can choose?
I don't want to be a troll but am I really the only one who every complained about this? I understand your idea of this alphanumeric sort but I've never seen files sorted in that way.
@rahra apparently so :)
You're not a troll, you have the right to different opinions! :+1:
I took a quick tour of various file browsers and none behaved like you asked.
I'm sorry, I will say that this is out of scope then :confused:
And adding an option for each specific request of a user will just make the software far too complex to be usable unfortunately.
Thanks again! Hope you still enjoy Nextcloud! :)
John
Most helpful comment
My guess: it is an alphanumeric sorting and the 2020 < 20180721 < 20190720 (these are numbers not dates!)