From 9313dad2c3a1e0c85d7f5f73334fdad94e52db6a Mon Sep 17 00:00:00 2001 From: "aditya.chandel" <> Date: Tue, 14 Jan 2025 18:52:21 -0700 Subject: [PATCH] Fix: Theme re-application not working. --- .../src/app/epub-viewer/component/epub-viewer.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/booklore-ui/src/app/epub-viewer/component/epub-viewer.component.ts b/booklore-ui/src/app/epub-viewer/component/epub-viewer.component.ts index affe9539e..492c0c180 100644 --- a/booklore-ui/src/app/epub-viewer/component/epub-viewer.component.ts +++ b/booklore-ui/src/app/epub-viewer/component/epub-viewer.component.ts @@ -88,7 +88,6 @@ export class EpubViewerComponent implements OnInit, OnDestroy { this.rendition.themes.register(name, theme); }); - this.setupKeyListener(); this.updateFontSize(); this.trackProgress(); @@ -142,7 +141,9 @@ export class EpubViewerComponent implements OnInit, OnDestroy { changeThemes($event: DropdownChangeEvent) { if (this.rendition) { - this.rendition.themes.select(this.selectedTheme) + this.rendition.themes.select(this.selectedTheme); + this.rendition.clear(); + this.rendition.start(); } } @@ -251,6 +252,4 @@ export class EpubViewerComponent implements OnInit, OnDestroy { } ] ]); - - }