albums: fix sort order

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/767/head
Varun Patil 2023-08-03 22:44:28 -07:00
parent 4ce6c5dbe1
commit 5b1cab9f91
2 changed files with 1 additions and 3 deletions

View File

@ -64,8 +64,6 @@ class AlbumsQuery
// GROUP and ORDER by
$query->groupBy('pa.album_id');
$query->orderBy('pa.created', 'DESC');
$query->addOrderBy('pa.album_id', 'DESC'); // tie-breaker
// WHERE these albums contain fileid if specified
if ($fileid) {

View File

@ -36,7 +36,7 @@ export async function getAlbums(sort: 1 | 2 = 1, fileid?: number) {
data.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: 'base' }));
break;
default:
data.sort((a, b) => b.last_added_photo - a.last_added_photo);
data.sort((a, b) => b.created - a.created);
}
return data;