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
1 changed files with 7 additions and 4 deletions

View File

@ -55,14 +55,17 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
super(searchService); super(searchService);
} }
async ngOnInit() {
this.userHasPremiumAccess = await this.stateService.getCanAccessPremium();
}
ngOnDestroy() { ngOnDestroy() {
this.selectAll(false); 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() { loadMore() {
if (this.ciphers.length <= this.pageSize) { if (this.ciphers.length <= this.pageSize) {
return; return;