From 9af61e84309c23ffbfd7562435a5fadd86cdf20c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Mar 2018 18:00:31 +0100 Subject: Don't forget to clean up subscriptions --- .../app/account/account-videos/account-videos.component.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'client/src/app/account') diff --git a/client/src/app/account/account-videos/account-videos.component.ts b/client/src/app/account/account-videos/account-videos.component.ts index a286bad1c..cd0f8e752 100644 --- a/client/src/app/account/account-videos/account-videos.component.ts +++ b/client/src/app/account/account-videos/account-videos.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core' +import { Component, OnInit, OnDestroy } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { immutableAssign } from '@app/shared/misc/utils' import { ComponentPagination } from '@app/shared/rest/component-pagination.model' @@ -17,18 +17,19 @@ import { VideoService } from '../../shared/video/video.service' templateUrl: './account-videos.component.html', styleUrls: [ './account-videos.component.scss' ] }) -export class AccountVideosComponent extends AbstractVideoList implements OnInit { +export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { titlePage = 'My videos' currentRoute = '/account/videos' checkedVideos: { [ id: number ]: boolean } = {} - videoHeight = 155 - videoWidth = -1 pagination: ComponentPagination = { currentPage: 1, itemsPerPage: 10, totalItems: null } + protected baseVideoWidth = -1 + protected baseVideoHeight = 155 + constructor (protected router: Router, protected route: ActivatedRoute, protected authService: AuthService, @@ -42,6 +43,10 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit super.ngOnInit() } + ngOnDestroy () { + super.ngOnDestroy() + } + abortSelectionMode () { this.checkedVideos = {} } -- cgit v1.2.3