mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Small bugfixes
This commit is contained in:
parent
3383e155bf
commit
577a3ea480
@ -24,8 +24,12 @@ export class BlogService {
|
||||
const dates = content.mediaGroups.map(g => g.date)
|
||||
.filter(d => !!d).map(d => d.getTime());
|
||||
|
||||
const firstMedia = content.mediaGroups[0].media.reduce((p, m) =>
|
||||
Math.min(m.metadata.creationDate, p), Number.MAX_SAFE_INTEGER);
|
||||
|
||||
let firstMedia = Number.MAX_SAFE_INTEGER;
|
||||
if (content.mediaGroups.length > 0) {
|
||||
firstMedia = content.mediaGroups[0].media.reduce((p, m) =>
|
||||
Math.min(m.metadata.creationDate, p), Number.MAX_SAFE_INTEGER);
|
||||
}
|
||||
|
||||
const files = this.mdFilesFilterPipe.transform(content.metaFile)
|
||||
.map(f => this.splitMarkDown(f, dates, firstMedia));
|
||||
|
@ -177,11 +177,11 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges {
|
||||
this.prevZoom = this.zoom;
|
||||
}
|
||||
|
||||
tap($event: { tapCount: number }): void {
|
||||
tap($event: Event): void {
|
||||
if (!this.activePhoto || this.activePhoto.gridMedia.isVideo()) {
|
||||
return;
|
||||
}
|
||||
if ($event.tapCount < 2) {
|
||||
if (($event as unknown as { tapCount: number }).tapCount < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user