1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Implement oldest photo based sorting. fixes #675

This commit is contained in:
Patrik J. Braun 2023-09-11 13:24:33 +02:00
parent 8c083ed59b
commit b5dce0a753

View File

@ -239,7 +239,7 @@ export class GallerySortingService {
Config.Gallery.enableDirectorySortingByDate === true
) {
c.directories.sort(
(a, b) => a.lastModified - b.lastModified
(a, b) => (a.oldestMedia || a.lastModified) - (b.oldestMedia || b.lastModified)
);
break;
}