diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2019-12-29 02:10:17 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2019-12-29 02:10:17 +0100 |
commit | 9d45db2919862640ad550c5326fb21ddc08d6d59 (patch) | |
tree | cfc6780f1180cd40536e0cdd8ad4383675475f42 /client/src/app/+my-account | |
parent | c62a34d36bf498cb81c6611e58079535325b92d8 (diff) | |
download | PeerTube-9d45db2919862640ad550c5326fb21ddc08d6d59.tar.gz PeerTube-9d45db2919862640ad550c5326fb21ddc08d6d59.tar.zst PeerTube-9d45db2919862640ad550c5326fb21ddc08d6d59.zip |
Fix my-account{videos,video-playlists} loading mecanism
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r-- | client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts index 42e4782eb..c6728cc30 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts | |||
@@ -48,7 +48,7 @@ export class MyAccountVideoPlaylistsComponent implements OnInit { | |||
48 | .pipe( | 48 | .pipe( |
49 | debounceTime(500)) | 49 | debounceTime(500)) |
50 | .subscribe(() => { | 50 | .subscribe(() => { |
51 | this.loadVideoPlaylists() | 51 | this.loadVideoPlaylists(true) |
52 | }) | 52 | }) |
53 | } | 53 | } |
54 | 54 | ||
@@ -93,13 +93,13 @@ export class MyAccountVideoPlaylistsComponent implements OnInit { | |||
93 | this.videoPlaylistSearchChanged.next() | 93 | this.videoPlaylistSearchChanged.next() |
94 | } | 94 | } |
95 | 95 | ||
96 | private loadVideoPlaylists () { | 96 | private loadVideoPlaylists (reset = false) { |
97 | this.authService.userInformationLoaded | 97 | this.authService.userInformationLoaded |
98 | .pipe(flatMap(() => { | 98 | .pipe(flatMap(() => { |
99 | return this.videoPlaylistService.listAccountPlaylists(this.user.account, this.pagination, '-updatedAt', this.videoPlaylistsSearch) | 99 | return this.videoPlaylistService.listAccountPlaylists(this.user.account, this.pagination, '-updatedAt', this.videoPlaylistsSearch) |
100 | })) | 100 | })) |
101 | .subscribe(res => { | 101 | .subscribe(res => { |
102 | this.videoPlaylists = [] | 102 | if (reset) this.videoPlaylists = [] |
103 | this.videoPlaylists = this.videoPlaylists.concat(res.data) | 103 | this.videoPlaylists = this.videoPlaylists.concat(res.data) |
104 | this.pagination.totalItems = res.total | 104 | this.pagination.totalItems = res.total |
105 | 105 | ||