diff --git a/src/app/settings/create-organization.component.ts b/src/app/settings/create-organization.component.ts index c8248da639..62d4715489 100644 --- a/src/app/settings/create-organization.component.ts +++ b/src/app/settings/create-organization.component.ts @@ -14,6 +14,7 @@ import { ApiService } from 'jslib/abstractions/api.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; +import { SyncService } from 'jslib/abstractions/sync.service'; import { PaymentComponent } from './payment.component'; @@ -82,7 +83,7 @@ export class CreateOrganizationComponent { constructor(private apiService: ApiService, private i18nService: I18nService, private analytics: Angulartics2, private toasterService: ToasterService, platformUtilsService: PlatformUtilsService, private cryptoService: CryptoService, - private router: Router) { + private router: Router, private syncService: SyncService) { this.selfHosted = platformUtilsService.isSelfHost(); } @@ -150,7 +151,10 @@ export class CreateOrganizationComponent { } async finalize(orgId: string) { - this.apiService.refreshIdentityToken(); + await Promise.all([ + this.apiService.refreshIdentityToken(), + this.syncService.fullSync(true), + ]); this.analytics.eventTrack.next({ action: 'Created Organization' }); this.toasterService.popAsync('success', this.i18nService.t('organizationCreated'), this.i18nService.t('organizationReadyToGo')); diff --git a/src/app/settings/premium.component.ts b/src/app/settings/premium.component.ts index 89f15f374e..5e7975d23e 100644 --- a/src/app/settings/premium.component.ts +++ b/src/app/settings/premium.component.ts @@ -12,6 +12,7 @@ import { ApiService } from 'jslib/abstractions/api.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; +import { SyncService } from 'jslib/abstractions/sync.service'; import { TokenService } from 'jslib/abstractions/token.service'; import { PaymentComponent } from './payment.component'; @@ -33,7 +34,8 @@ export class PremiumComponent implements OnInit { constructor(private apiService: ApiService, private i18nService: I18nService, private analytics: Angulartics2, private toasterService: ToasterService, platformUtilsService: PlatformUtilsService, private tokenService: TokenService, - private router: Router, private messagingService: MessagingService) { + private router: Router, private messagingService: MessagingService, + private syncService: SyncService) { this.selfHosted = platformUtilsService.isSelfHost(); } @@ -79,7 +81,10 @@ export class PremiumComponent implements OnInit { } async finalizePremium() { - await this.apiService.refreshIdentityToken(); + await Promise.all([ + this.apiService.refreshIdentityToken(), + this.syncService.fullSync(true), + ]); this.analytics.eventTrack.next({ action: 'Signed Up Premium' }); this.toasterService.popAsync('success', null, this.i18nService.t('premiumUpdated')); this.messagingService.send('purchasedPremium'); diff --git a/src/app/vault/ciphers.component.html b/src/app/vault/ciphers.component.html index bcb09d70ea..f316f4a189 100644 --- a/src/app/vault/ciphers.component.html +++ b/src/app/vault/ciphers.component.html @@ -2,7 +2,7 @@
+ | @@ -30,7 +30,7 @@ {{'attachments' | i18n}} - + {{'share' | i18n}} |