diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-19 18:00:31 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-19 18:00:31 +0100 |
commit | 9af61e84309c23ffbfd7562435a5fadd86cdf20c (patch) | |
tree | eb367495b082a776c21b603c40bbe2ad0a8ebc6d /client/src/app/account/account-videos | |
parent | 606ca5bccf55e75a20a70d41a4d1f2cbf12d2563 (diff) | |
download | PeerTube-9af61e84309c23ffbfd7562435a5fadd86cdf20c.tar.gz PeerTube-9af61e84309c23ffbfd7562435a5fadd86cdf20c.tar.zst PeerTube-9af61e84309c23ffbfd7562435a5fadd86cdf20c.zip |
Don't forget to clean up subscriptions
Diffstat (limited to 'client/src/app/account/account-videos')
-rw-r--r-- | client/src/app/account/account-videos/account-videos.component.ts | 13 |
1 files changed, 9 insertions, 4 deletions
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 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit, OnDestroy } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { immutableAssign } from '@app/shared/misc/utils' | 3 | import { immutableAssign } from '@app/shared/misc/utils' |
4 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 4 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' |
@@ -17,18 +17,19 @@ import { VideoService } from '../../shared/video/video.service' | |||
17 | templateUrl: './account-videos.component.html', | 17 | templateUrl: './account-videos.component.html', |
18 | styleUrls: [ './account-videos.component.scss' ] | 18 | styleUrls: [ './account-videos.component.scss' ] |
19 | }) | 19 | }) |
20 | export class AccountVideosComponent extends AbstractVideoList implements OnInit { | 20 | export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { |
21 | titlePage = 'My videos' | 21 | titlePage = 'My videos' |
22 | currentRoute = '/account/videos' | 22 | currentRoute = '/account/videos' |
23 | checkedVideos: { [ id: number ]: boolean } = {} | 23 | checkedVideos: { [ id: number ]: boolean } = {} |
24 | videoHeight = 155 | ||
25 | videoWidth = -1 | ||
26 | pagination: ComponentPagination = { | 24 | pagination: ComponentPagination = { |
27 | currentPage: 1, | 25 | currentPage: 1, |
28 | itemsPerPage: 10, | 26 | itemsPerPage: 10, |
29 | totalItems: null | 27 | totalItems: null |
30 | } | 28 | } |
31 | 29 | ||
30 | protected baseVideoWidth = -1 | ||
31 | protected baseVideoHeight = 155 | ||
32 | |||
32 | constructor (protected router: Router, | 33 | constructor (protected router: Router, |
33 | protected route: ActivatedRoute, | 34 | protected route: ActivatedRoute, |
34 | protected authService: AuthService, | 35 | protected authService: AuthService, |
@@ -42,6 +43,10 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit | |||
42 | super.ngOnInit() | 43 | super.ngOnInit() |
43 | } | 44 | } |
44 | 45 | ||
46 | ngOnDestroy () { | ||
47 | super.ngOnDestroy() | ||
48 | } | ||
49 | |||
45 | abortSelectionMode () { | 50 | abortSelectionMode () { |
46 | this.checkedVideos = {} | 51 | this.checkedVideos = {} |
47 | } | 52 | } |