Commit 55b9ceb6 authored by Olivia Madrid's avatar Olivia Madrid

(feat): remove an unused fx to pass tests

1 merge request!530WIP: Agnostic media modal
Pipeline #79366669 failed with stages
in 8 minutes and 34 seconds
......@@ -2,11 +2,11 @@ import { Component } from '@angular/core';
import { Session } from '../../../services/session';
import { AttachmentService } from '../../../services/attachment';
import { ACCESS } from '../../../services/list-options';
import { Router } from '@angular/router';
import { MediaModalComponent } from '../../media/modal/modal.component';
import { OverlayModalService } from '../../../services/ux/overlay-modal';
import { FeaturesService } from '../../../services/features.service';
import isMobile from '../../../helpers/is-mobile';
// import { Router } from '@angular/router';
// import { MediaModalComponent } from '../../media/modal/modal.component';
// import { OverlayModalService } from '../../../services/ux/overlay-modal';
// import { FeaturesService } from '../../../services/features.service';
// import isMobile from '../../../helpers/is-mobile';
@Component({
moduleId: module.id,
......@@ -22,9 +22,9 @@ export class BlogCard {
constructor(
public session: Session,
public attachment: AttachmentService,
private router: Router,
protected featuresService: FeaturesService,
private overlayModal: OverlayModalService
// private router: Router,
// protected featuresService: FeaturesService,
// private overlayModal: OverlayModalService
) {
this.minds = window.Minds;
}
......@@ -35,28 +35,28 @@ export class BlogCard {
this.blog = value;
}
showMediaModal() {
const route = this.blog.route
? `/${this.blog.route}`
: `/blog/view${this.blog.guid}`;
const isNotTablet = Math.min(screen.width, screen.height) < 768;
// showMediaModal() {
// const route = this.blog.route
// ? `/${this.blog.route}`
// : `/blog/view${this.blog.guid}`;
// const isNotTablet = Math.min(screen.width, screen.height) < 768;
if (isMobile() && isNotTablet) {
this.router.navigate([route]);
return;
}
// if (isMobile() && isNotTablet) {
// this.router.navigate([route]);
// return;
// }
if (!this.featuresService.has('media-modal')) {
this.router.navigate([route]);
return;
} else {
this.blog.modal_source_url = this.router.url;
// if (!this.featuresService.has('media-modal')) {
// this.router.navigate([route]);
// return;
// } else {
// this.blog.modal_source_url = this.router.url;
this.overlayModal
.create(MediaModalComponent, this.blog, {
class: 'm-overlayModal--media',
})
.present();
}
}
// this.overlayModal
// .create(MediaModalComponent, this.blog, {
// class: 'm-overlayModal--media',
// })
// .present();
// }
// }
}
......@@ -214,7 +214,7 @@ describe('MindsVideo', () => {
// video.src = 'thisisavideo.mp4';
const video = new HTMLVideoElementMock();
comp.playerRef.getPlayer = () => <any>video;
comp.isActivity = false;
comp.shouldPlayInModal = false;
comp.showControls = true;
fixture.detectChanges(); // re-render
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment