Fix: Theme re-application not working.

This commit is contained in:
aditya.chandel
2025-01-14 18:52:21 -07:00
parent cc75d91c9d
commit 9313dad2c3
@@ -88,7 +88,6 @@ export class EpubViewerComponent implements OnInit, OnDestroy {
this.rendition.themes.register(name, theme); this.rendition.themes.register(name, theme);
}); });
this.setupKeyListener(); this.setupKeyListener();
this.updateFontSize(); this.updateFontSize();
this.trackProgress(); this.trackProgress();
@@ -142,7 +141,9 @@ export class EpubViewerComponent implements OnInit, OnDestroy {
changeThemes($event: DropdownChangeEvent) { changeThemes($event: DropdownChangeEvent) {
if (this.rendition) { 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 {
} }
] ]
]); ]);
} }