From ff1bb8dee192e833775a0b80abf62bb3ff792d52 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Thu, 10 Dec 2020 19:34:15 -0500 Subject: [PATCH] Reduced the max number of ghost cards to 10 for performance reasons --- src/app/components/recent-videos/recent-videos.component.ts | 3 ++- 1 file changed, 2 insertions(+), 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 5c2503d..a0667c7 100644 --- a/src/app/components/recent-videos/recent-videos.component.ts +++ b/src/app/components/recent-videos/recent-videos.component.ts @@ -59,7 +59,8 @@ export class RecentVideosComponent implements OnInit { constructor(public postsService: PostsService, private router: Router) { // get cached file count if (localStorage.getItem('cached_file_count')) { - this.cached_file_count = +localStorage.getItem('cached_file_count'); + this.cached_file_count = +localStorage.getItem('cached_file_count') <= 10 ? +localStorage.getItem('cached_file_count') : 10; + this.loading_files = Array(this.cached_file_count).fill(0); } }