Unified videos videos are now properly retrieved from the server

This commit is contained in:
Isaac Grynsztein
2020-07-15 23:37:00 -04:00
parent 4ebb2d4297
commit cc189a3abd
4 changed files with 54 additions and 12 deletions

View File

@@ -15,10 +15,19 @@ export class RecentVideosComponent implements OnInit {
constructor(private postsService: PostsService) { }
ngOnInit(): void {
this.postsService.service_initialized.subscribe(init => {
if (init) {
this.getAllFiles();
}
});
}
getAllFiles() {
this.normal_files_received = false;
this.postsService.getAllFiles().subscribe(res => {
this.files = res['files'];
this.files.sort(this.sortFiles);
});
}
sortFiles(a, b) {