diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 36d7c652..b17a6855 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -35,7 +35,6 @@ import { CryptoService } from 'jslib/abstractions/crypto.service'; import { EventService } from 'jslib/abstractions/event.service'; import { FolderService } from 'jslib/abstractions/folder.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; -import { MessagingService } from 'jslib/abstractions/messaging.service'; import { NotificationsService } from 'jslib/abstractions/notifications.service'; import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; @@ -85,7 +84,7 @@ export class AppComponent implements OnDestroy, OnInit { private sanitizer: DomSanitizer, private searchService: SearchService, private notificationsService: NotificationsService, private routerService: RouterService, private stateService: StateService, private eventService: EventService, - private policyService: PolicyService, private messagingService: MessagingService) { } + private policyService: PolicyService) { } ngOnInit() { this.ngZone.runOutsideAngular(() => { @@ -151,7 +150,6 @@ export class AppComponent implements OnDestroy, OnInit { }); break; case 'setFullWidth': - this.enableFullWidth = await this.storageService.get('enableFullWidth'); this.setFullWidth(); break; default: @@ -172,7 +170,7 @@ export class AppComponent implements OnDestroy, OnInit { } } }); - this.messagingService.send('setFullWidth'); + this.setFullWidth(); } ngOnDestroy() { @@ -271,6 +269,7 @@ export class AppComponent implements OnDestroy, OnInit { } private async setFullWidth() { + this.enableFullWidth = await this.storageService.get('enableFullWidth'); if (this.enableFullWidth) { document.body.classList.add('full-width'); } else {