diff --git a/src/app/app.component.ts b/src/app/app.component.ts index b17a685538..6807ec8919 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -69,7 +69,6 @@ export class AppComponent implements OnDestroy, OnInit { private lastActivity: number = null; private idleTimer: number = null; private isIdle = false; - private enableFullWidth = false; constructor(private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics, private broadcasterService: BroadcasterService, private userService: UserService, @@ -170,6 +169,7 @@ export class AppComponent implements OnDestroy, OnInit { } } }); + this.setFullWidth(); } @@ -269,8 +269,8 @@ export class AppComponent implements OnDestroy, OnInit { } private async setFullWidth() { - this.enableFullWidth = await this.storageService.get('enableFullWidth'); - if (this.enableFullWidth) { + const enableFullWidth = await this.storageService.get('enableFullWidth'); + if (enableFullWidth) { document.body.classList.add('full-width'); } else { document.body.classList.remove('full-width'); diff --git a/src/app/settings/options.component.ts b/src/app/settings/options.component.ts index 23de0086ad..bb46e1a36e 100644 --- a/src/app/settings/options.component.ts +++ b/src/app/settings/options.component.ts @@ -80,7 +80,6 @@ export class OptionsComponent implements OnInit { await this.storageService.save('enableGravatars', this.enableGravatars); await this.stateService.save('enableGravatars', this.enableGravatars); await this.storageService.save('enableFullWidth', this.enableFullWidth); - await this.stateService.save('enableFullWidth', this.enableFullWidth); this.messagingService.send('setFullWidth'); await this.storageService.save(ConstantsService.localeKey, this.locale); this.analytics.eventTrack.next({ action: 'Saved Options' }); diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 5422ff76f6..db93779322 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -1049,7 +1049,7 @@ "description": "Allows scaling the web vault UI's width" }, "enableFullWidthDesc": { - "message": "Allows expanding the web vault view to fill the full width of the browser window." + "message": "Allow the web vault to expand the full width of the browser window." }, "default": { "message": "Default"