pull/37/head
Varun Patil 2022-08-15 23:14:24 +00:00
parent 61161b234e
commit 5c55b79175
2 changed files with 12 additions and 10 deletions

View File

@ -115,14 +115,15 @@ class Util {
string $user,
int $dayId,
): array {
$qb = $connection->getQueryBuilder();
$qb->select('file_id')
->from('betterphotos')
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($user)))
->andWhere($qb->expr()->eq('day_id', $qb->createNamedParameter($dayId)))
->orderBy('date_taken', 'DESC');
$result = $qb->executeQuery();
$rows = $result->fetchAll();
return $rows;
$sql = 'SELECT file_id, oc_filecache.etag
FROM oc_betterphotos
LEFT JOIN oc_filecache
ON oc_filecache.fileid = oc_betterphotos.file_id
WHERE user_id = ? AND day_id = ?
ORDER BY date_taken DESC';
$rows = $connection->executeQuery($sql, [$user, $dayId], [
\PDO::PARAM_STR, \PDO::PARAM_INT,
]);
return $rows->fetchAll();
}
}

View File

@ -262,7 +262,7 @@ export default {
// Add the photo to the row
this.list[rowIdx].photos.push({
id: p.file_id,
src: `/core/preview?fileId=${p.file_id}&x=250&y=250`,
src: `/core/preview?fileId=${p.file_id}&c=${p.etag}&x=250&y=250&forceIcon=0&a=0`,
});
}
@ -432,6 +432,7 @@ export default {
font-size: 0.8em;
color: grey;
right: 5px;
transform: translateY(-50%);
}
.timeline-scroll .tick .dash {