Skip to content
Snippets Groups Projects
Commit 0eb4490e authored by jojohoch's avatar jojohoch
Browse files

[player] Do not include always visible page in visible pages

parent 3858b480
No related branches found
No related tags found
No related merge requests found
......@@ -14,13 +14,15 @@ export class ValidPagesPipe implements PipeTransform {
}
private getValidPages(pages: Page[]): Record<string, string> {
return pages.reduce(
(validPages: Record<string, string>, page: Page, index: number) => ({
...validPages,
[index.toString(10)]: `${this.translateService.instant(
'pageIndication', { index: index + 1 }
)}`
}), {}
);
return pages
.filter((page: Page): boolean => !page.alwaysVisible)
.reduce(
(validPages: Record<string, string>, page: Page, index: number) => ({
...validPages,
[index.toString(10)]: `${this.translateService.instant(
'pageIndication', { index: index + 1 }
)}`
}), {}
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment