1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-13 10:24:20 +01:00

Fix Copy Verification Code not showing after first log in (#1459)

* Move init logic to load()
This commit is contained in:
Thomas Rittson 2022-02-11 09:48:54 +10:00 committed by GitHub
parent ff6bb236c0
commit aee8a2661e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,14 +55,17 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
super(searchService);
}
async ngOnInit() {
this.userHasPremiumAccess = await this.stateService.getCanAccessPremium();
}
ngOnDestroy() {
this.selectAll(false);
}
// load() is called after the page loads and the first sync has completed.
// Do not use ngOnInit() for anything that requires sync data.
async load(filter: (cipher: CipherView) => boolean = null, deleted: boolean = false) {
await super.load(filter, deleted);
this.userHasPremiumAccess = await this.stateService.getCanAccessPremium();
}
loadMore() {
if (this.ciphers.length <= this.pageSize) {
return;