Date Sort not working properly
For both descending and ascending, I noticed pictures of various dates towards the top, some I took almost a year ago. I have since moved the pictures, but can try to replicate the problem and provide screenshots if needed. Using a Samsung Note 10+ with the latest android updates.
I noticed this as well, however the same pictures were out of place in a stock gallery app on the same device. Upstream bug?
Going to picture details displays 1970 as a date which is obviously wrong. Now, I don't know android at all, but I can see 3 dates available in MediaStore, leafpic uses DATE_TAKEN (I assume it's EXIF metadata but dunno) which in my case returned 0 for all of my pictures. I replaced DATE_TAKEN with DATE_MODIFIED (I assume it's a file attribute instead) and it worked wonders for me. You can try it out by building https://github.com/DanielChabrowski/leafpicrevived/tree/dch/use-date-modified.
However, I don't think this is a proper solution to the issue - leafpic should probably allow sorting by both with some sort of warning that sorting with DATE_TAKEN might be wrong.
DATE_TAKEN ist the Key for the Date when the Picture or file got created. In case of 1970 maybe the photographer knew that it is a picture of the 70s? DATE_MODIFIED is the Key for the Date when the File got moved or changed. In Case of the Pictures you made with your Camera you want to sort sith DATE_TAKEN. In all other cases DATE_MODIFIED might be the better choice. So the best would be to add a sorting for changedate.