Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

fix(theme-picker) fix theme picker bugs on mobile #496

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/app/shared/theme-picker/theme-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ export class ThemePicker {
if (theme.isDefault) {
this.styleManager.removeStyle('theme');
} else {
this.styleManager.setStyle('theme', `assets/${theme.href}`);
// use timout to fix https://github.com/angular/material.angular.io/issues/495
setTimeout(() => {
this.styleManager.setStyle('theme', `assets/${theme.href}`);
});
}

if (this.currentTheme) {
Expand Down