From e57a38fbb12c2cbe673c308e4bf87c6b615aa4af Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 25 Apr 2018 12:08:23 -0400 Subject: [PATCH] move sync to post login action --- jslib | 2 +- src/popup/accounts/login.component.ts | 9 ++++++--- src/popup/accounts/two-factor.component.ts | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/jslib b/jslib index 31bd1f9423f..05e6d2c0f0a 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 31bd1f9423f71ed749d27f9500eb88d272f112d1 +Subproject commit 05e6d2c0f0aa6cae6a5e53fac6dccf2a1d75a555 diff --git a/src/popup/accounts/login.component.ts b/src/popup/accounts/login.component.ts index a119ff2b922..a02f3448b5d 100644 --- a/src/popup/accounts/login.component.ts +++ b/src/popup/accounts/login.component.ts @@ -17,9 +17,12 @@ import { LoginComponent as BaseLoginComponent } from 'jslib/angular/components/l export class LoginComponent extends BaseLoginComponent { constructor(authService: AuthService, router: Router, analytics: Angulartics2, toasterService: ToasterService, - i18nService: I18nService, syncService: SyncService) { - super(authService, router, analytics, toasterService, i18nService, syncService); - this.successRoute = '/tabs/vault'; + i18nService: I18nService, private syncService: SyncService) { + super(authService, router, analytics, toasterService, i18nService); + super.onSuccessfullLogin = () => { + return syncService.fullSync(true); + }; + super.successRoute = '/tabs/vault'; } settings() { diff --git a/src/popup/accounts/two-factor.component.ts b/src/popup/accounts/two-factor.component.ts index 6006c157869..4d3adb21982 100644 --- a/src/popup/accounts/two-factor.component.ts +++ b/src/popup/accounts/two-factor.component.ts @@ -42,8 +42,11 @@ export class TwoFactorComponent extends BaseTwoFactorComponent { environmentService: EnvironmentService, private ngZone: NgZone, private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef) { super(authService, router, analytics, toasterService, i18nService, apiService, - platformUtilsService, syncService, window, environmentService); - this.successRoute = '/tabs/vault'; + platformUtilsService, window, environmentService); + super.onSuccessfullLogin = () => { + return syncService.fullSync(true); + }; + super.successRoute = '/tabs/vault'; } async ngOnInit() {