1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

load cipher from state

This commit is contained in:
Kyle Spearrin
2018-04-09 17:35:56 -04:00
parent 2c87f12718
commit 4f79addb8a
2 changed files with 22 additions and 24 deletions

View File

@@ -2,10 +2,8 @@ import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
import {
ChangeDetectorRef,
EventEmitter,
Input,
NgZone,
OnInit,
Output,
} from '@angular/core';
@@ -25,8 +23,7 @@ export class PasswordGeneratorComponent implements OnInit {
constructor(protected passwordGenerationService: PasswordGenerationService, protected analytics: Angulartics2,
protected platformUtilsService: PlatformUtilsService, protected i18nService: I18nService,
protected toasterService: ToasterService, protected ngZone: NgZone,
protected changeDetectorRef: ChangeDetectorRef) { }
protected toasterService: ToasterService) { }
async ngOnInit() {
this.options = await this.passwordGenerationService.getOptions();
@@ -116,11 +113,4 @@ export class PasswordGeneratorComponent implements OnInit {
this.options.minSpecial = this.options.length - this.options.minNumber;
}
}
private functionWithChangeDetection(func: Function) {
this.ngZone.run(async () => {
func();
this.changeDetectorRef.detectChanges();
});
}
}