From d323e775cabf1767b84744b3c96e08d6c991f9bb Mon Sep 17 00:00:00 2001 From: syntaxerror752 Date: Sun, 31 May 2020 22:02:41 +1000 Subject: [PATCH] Removed the need for the messageing service to be in app.component.ts --- src/app/app.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 36d7c652f0..b17a685538 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 {