Skip to content
Snippets Groups Projects
Commit 445b95f7 authored by Marcelo Rivera's avatar Marcelo Rivera
Browse files

(fix): only set timeout for theme toggling if logged in

parent 9ad37154
No related branches found
No related tags found
Loading
......@@ -36,7 +36,6 @@ export class V2TopbarComponent implements OnInit {
ngOnInit() {
this.loadComponent();
this.session.isLoggedIn(() => this.detectChanges());
}
getCurrentUser() {
......@@ -59,10 +58,11 @@ export class V2TopbarComponent implements OnInit {
}
mouseEnter() {
if (this.session.isLoggedIn()) {
this.timeout = setTimeout(() => {
this.themeService.toggleUserThemePreference();
}, 5000);
}
}
mouseLeave() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment