mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 09:26:14 -08:00
refactor: remove unused method
This commit is contained in:
1 parent
06d76dbe71
commit
fe96eac8ae
2 files changed
-21
No files matched your search
@@ -132,16 +132,6 @@ describe('HomeComponent', () => {
|
||||
expect(component.showNotification).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('should navigate to the player view', () => {
|
||||
jest.spyOn(router, 'navigateByUrl');
|
||||
const playlistId = 'some-id';
|
||||
component.navigateToPlayer(playlistId);
|
||||
expect(router.navigateByUrl).toHaveBeenCalledTimes(1);
|
||||
expect(router.navigateByUrl).toHaveBeenCalledWith(
|
||||
`/playlists/${playlistId}`
|
||||
);
|
||||
});
|
||||
|
||||
it('should remove all ipc listeners on destroy', () => {
|
||||
jest.spyOn(electronService, 'removeAllListeners');
|
||||
component.ngOnDestroy();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Component, NgZone } from '@angular/core';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { Router } from '@angular/router';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
@@ -32,7 +31,6 @@ export class HomeComponent {
|
||||
playlist: response.payload,
|
||||
})
|
||||
);
|
||||
this.navigateToPlayer(response.payload._id);
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -46,7 +44,6 @@ export class HomeComponent {
|
||||
constructor(
|
||||
private dataService: DataService,
|
||||
private ngZone: NgZone,
|
||||
private router: Router,
|
||||
private snackBar: MatSnackBar,
|
||||
private readonly store: Store,
|
||||
private translateService: TranslateService
|
||||
@@ -107,14 +104,6 @@ export class HomeComponent {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates to the video player route
|
||||
*/
|
||||
navigateToPlayer(playlistId: string): void {
|
||||
this.isLoading = false;
|
||||
this.router.navigateByUrl(`/playlists/${playlistId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends url of the playlist to the renderer process
|
||||
* @param playlistUrl url of the added playlist
|
||||
|
||||
Reference in new issue
Block a user