Ghost file card count are now per-sub

pull/873/head
Tzahi12345 3 years ago
parent 5aea0b7a3d
commit 0e190fca2a

@ -76,8 +76,9 @@ export class RecentVideosComponent implements OnInit {
constructor(public postsService: PostsService, private router: Router) { constructor(public postsService: PostsService, private router: Router) {
// get cached file count // get cached file count
if (localStorage.getItem('cached_file_count')) { const sub_id_appendix = this.sub_id ? `_${this.sub_id}` : ''
this.cached_file_count = +localStorage.getItem('cached_file_count') <= 10 ? +localStorage.getItem('cached_file_count') : 10; if (localStorage.getItem(`cached_file_count${sub_id_appendix}`)) {
this.cached_file_count = +localStorage.getItem(`cached_file_count${sub_id_appendix}`) <= 10 ? +localStorage.getItem(`cached_file_count${sub_id_appendix}`) : 10;
this.loading_files = Array(this.cached_file_count).fill(0); this.loading_files = Array(this.cached_file_count).fill(0);
} }

Loading…
Cancel
Save