...
 
Commits (2)
......@@ -231,9 +231,6 @@ export class MediaModalComponent implements OnInit, OnDestroy {
if (!this.nextEntity) {
this.nextEntity = next;
}
console.log('prevEntity', this.prevEntity);
console.log('nextEntity', this.nextEntity);
}
load() {
......@@ -336,6 +333,8 @@ export class MediaModalComponent implements OnInit, OnDestroy {
this.pageUrl = this.redirectUrl;
} else if (this.contentType === 'rich-embed') {
this.pageUrl = `/newsfeed/${this.entity.guid}`;
} else if (this.contentType === 'blog') {
this.pageUrl = `/${this.entity.ownerObj.username}/blog/${this.entity.slug}-${this.entity.guid}`;
} else {
this.pageUrl = `/media/${this.entity.entity_guid}`;
}
......@@ -664,21 +663,23 @@ export class MediaModalComponent implements OnInit, OnDestroy {
goToNext(): void {
const entity = this.nextEntity;
entity.modal_source_url = this.entity.modal_source_url || '';
this.prevEntity = this.originalEntity;
this.nextEntity = null;
this.setEntity(entity /* , redirectUrl */);
this.setEntity(entity);
this.load();
}
goToPrev(): void {
const entity = this.prevEntity;
entity.modal_source_url = this.entity.modal_source_url || '';
this.prevEntity = null;
this.nextEntity = this.originalEntity;
this.setEntity(entity /* , redirectUrl */);
this.setEntity(entity);
this.load();
}
......