From ea959547fdd68a37a8901c182578abb94b0f2368 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Mon, 28 Dec 2020 00:22:14 -0500 Subject: [PATCH] Fixed bug where file indices were incorrectly assigned --- src/app/components/recent-videos/recent-videos.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/recent-videos/recent-videos.component.ts b/src/app/components/recent-videos/recent-videos.component.ts index 83bd72f..68125cf 100644 --- a/src/app/components/recent-videos/recent-videos.component.ts +++ b/src/app/components/recent-videos/recent-videos.component.ts @@ -127,12 +127,12 @@ export class RecentVideosComponent implements OnInit { this.normal_files_received = false; this.postsService.getAllFiles().subscribe(res => { this.files = res['files']; + this.files.sort(this.sortFiles); for (let i = 0; i < this.files.length; i++) { const file = this.files[i]; file.duration = typeof file.duration !== 'string' ? file.duration : this.durationStringToNumber(file.duration); file.index = i; } - this.files.sort(this.sortFiles); if (this.search_mode) { this.filterFiles(this.search_text); } else {