From 23db998f07d674c621972a769df73203b14e093a Mon Sep 17 00:00:00 2001 From: BO41 Date: Sat, 22 Sep 2018 20:11:16 +0200 Subject: remove unused imports --- client/src/app/shared/guards/can-deactivate-guard.service.ts | 8 ++------ client/src/app/shared/overview/overview.service.ts | 2 -- client/src/app/shared/rest/rest-extractor.service.ts | 4 +--- .../app/shared/user-subscription/subscribe-button.component.ts | 6 ------ client/src/app/shared/video-caption/video-caption.service.ts | 3 +-- 5 files changed, 4 insertions(+), 19 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/guards/can-deactivate-guard.service.ts b/client/src/app/shared/guards/can-deactivate-guard.service.ts index c038a5c0e..e2a79e8c4 100644 --- a/client/src/app/shared/guards/can-deactivate-guard.service.ts +++ b/client/src/app/shared/guards/can-deactivate-guard.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core' -import { ActivatedRouteSnapshot, CanDeactivate, RouterStateSnapshot } from '@angular/router' +import { CanDeactivate } from '@angular/router' import { Observable } from 'rxjs' import { ConfirmService } from '../../core/index' import { I18n } from '@ngx-translate/i18n-polyfill' @@ -15,11 +15,7 @@ export class CanDeactivateGuard implements CanDeactivate private i18n: I18n ) { } - canDeactivate (component: CanComponentDeactivate, - currentRoute: ActivatedRouteSnapshot, - currentState: RouterStateSnapshot, - nextState: RouterStateSnapshot - ) { + canDeactivate (component: CanComponentDeactivate) { const result = component.canDeactivate() const text = result.text || this.i18n('All unsaved data will be lost, are you sure you want to leave this page?') diff --git a/client/src/app/shared/overview/overview.service.ts b/client/src/app/shared/overview/overview.service.ts index 097079e6d..98dba2d97 100644 --- a/client/src/app/shared/overview/overview.service.ts +++ b/client/src/app/shared/overview/overview.service.ts @@ -5,7 +5,6 @@ import { forkJoin, Observable, of } from 'rxjs' import { VideosOverview as VideosOverviewServer, peertubeTranslate } from '../../../../../shared/models' import { environment } from '../../../environments/environment' import { RestExtractor } from '../rest/rest-extractor.service' -import { RestService } from '../rest/rest.service' import { VideosOverview } from '@app/shared/overview/videos-overview.model' import { VideoService } from '@app/shared/video/video.service' import { ServerService } from '@app/core' @@ -18,7 +17,6 @@ export class OverviewService { constructor ( private authHttp: HttpClient, private restExtractor: RestExtractor, - private restService: RestService, private videosService: VideoService, private serverService: ServerService ) {} diff --git a/client/src/app/shared/rest/rest-extractor.service.ts b/client/src/app/shared/rest/rest-extractor.service.ts index 0d5b6d6f3..6492aa66d 100644 --- a/client/src/app/shared/rest/rest-extractor.service.ts +++ b/client/src/app/shared/rest/rest-extractor.service.ts @@ -11,9 +11,7 @@ export class RestExtractor { constructor ( private router: Router, private i18n: I18n - ) { - // empty - } + ) { } extractDataBool () { return true diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts index ba7acf69a..b5873a2ee 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.ts +++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts @@ -1,7 +1,4 @@ import { Component, Input, OnInit } from '@angular/core' -import { AuthService } from '@app/core' -import { RestExtractor } from '@app/shared/rest' -import { RedirectService } from '@app/core/routing/redirect.service' import { UserSubscriptionService } from '@app/shared/user-subscription/user-subscription.service' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { NotificationsService } from 'angular2-notifications' @@ -20,9 +17,6 @@ export class SubscribeButtonComponent implements OnInit { subscribed: boolean constructor ( - private authService: AuthService, - private restExtractor: RestExtractor, - private redirectService: RedirectService, private notificationsService: NotificationsService, private userSubscriptionService: UserSubscriptionService, private i18n: I18n diff --git a/client/src/app/shared/video-caption/video-caption.service.ts b/client/src/app/shared/video-caption/video-caption.service.ts index 08fd61265..a1838ab16 100644 --- a/client/src/app/shared/video-caption/video-caption.service.ts +++ b/client/src/app/shared/video-caption/video-caption.service.ts @@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http' import { Injectable } from '@angular/core' import { forkJoin, Observable, of } from 'rxjs' import { peertubeTranslate, ResultList } from '../../../../../shared' -import { RestExtractor, RestService } from '../rest' +import { RestExtractor } from '../rest' import { VideoService } from '@app/shared/video/video.service' import { objectToFormData, sortBy } from '@app/shared/misc/utils' import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' @@ -15,7 +15,6 @@ export class VideoCaptionService { constructor ( private authHttp: HttpClient, private serverService: ServerService, - private restService: RestService, private restExtractor: RestExtractor ) {} -- cgit v1.2.3