@@ -12,6 +12,7 @@ import { MatDialog } from '@angular/material'
1212import { TransitionService } from './services/transitions.service'
1313import { AnalyticsService } from './services/analytics.service'
1414import { ApplicationService } from './services/app.service'
15+ import { SettingsService , IconMode } from './sections/settings/settings.service'
1516
1617@Component ( {
1718 selector : 'app-root' ,
@@ -37,11 +38,13 @@ export class AppComponent implements OnInit, AfterContentInit {
3738 public matDialog : MatDialog ,
3839 private transitions : TransitionService ,
3940 private analytics : AnalyticsService ,
40- private app : ApplicationService
41+ private app : ApplicationService ,
42+ private settings : SettingsService
4143 ) { }
4244
4345 async ngOnInit ( ) {
44- this . sync ( )
46+ await this . sync ( )
47+ await this . fixUIMode ( )
4548 this . analytics . send ( )
4649 }
4750
@@ -108,6 +111,17 @@ export class AppComponent implements OnInit, AfterContentInit {
108111 }
109112 }
110113
114+ async fixUIMode ( ) {
115+ const [ mode , iconMode ] = await Promise . all ( [
116+ this . ui . getMode ( ) ,
117+ this . settings . getIconMode ( )
118+ ] )
119+
120+ if ( mode === 'popover' && iconMode === IconMode . dock ) {
121+ await this . ui . setMode ( 'window' )
122+ }
123+ }
124+
111125 closeDropdownSection ( section : string , event ?: any ) {
112126 // if (event && event.target && ['backdrop', 'mat-dialog'].some(e => event.target.className.includes(e))) return
113127 if ( this . matDialog . openDialogs . length ) return
0 commit comments