From 09f4ee7f6763e6ab6a5eb6abe79d9bef62b84ec0 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 13 Aug 2018 14:09:22 -0400 Subject: [PATCH] clear search index --- jslib | 2 +- src/app/app.component.ts | 6 ++++-- src/app/services.module.ts | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/jslib b/jslib index d917651d9f..364192b27a 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit d917651d9f844dc07abf3e817073aa1e10213b9a +Subproject commit 364192b27a54d76bd95929ee88a954548c0229c9 diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ca39b5a1f0..57f3bd7ddb 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -5,7 +5,6 @@ import { Component, ComponentFactoryResolver, NgZone, - OnDestroy, OnInit, Type, ViewChild, @@ -34,6 +33,7 @@ import { LockService } from 'jslib/abstractions/lock.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; +import { SearchService } from 'jslib/abstractions/search.service'; import { SettingsService } from 'jslib/abstractions/settings.service'; import { StorageService } from 'jslib/abstractions/storage.service'; import { SyncService } from 'jslib/abstractions/sync.service'; @@ -79,7 +79,8 @@ export class AppComponent implements OnInit { private platformUtilsService: PlatformUtilsService, private ngZone: NgZone, private lockService: LockService, private storageService: StorageService, private cryptoService: CryptoService, private componentFactoryResolver: ComponentFactoryResolver, - private messagingService: MessagingService, private collectionService: CollectionService) { + private messagingService: MessagingService, private collectionService: CollectionService, + private searchService: SearchService) { (window as any).BitwardenToasterService = toasterService; } @@ -161,6 +162,7 @@ export class AppComponent implements OnInit { this.passwordGenerationService.clear(), ]); + this.searchService.clearIndex(); this.authService.logOut(async () => { this.analytics.eventTrack.next({ action: 'Logged Out' }); if (expired) { diff --git a/src/app/services.module.ts b/src/app/services.module.ts index d7bf01ad5a..38608a9033 100644 --- a/src/app/services.module.ts +++ b/src/app/services.module.ts @@ -98,9 +98,9 @@ const cipherService = new CipherService(cryptoService, userService, settingsServ const folderService = new FolderService(cryptoService, userService, apiService, storageService, i18nService, cipherService); const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService); -const lockService = new LockService(cipherService, folderService, collectionService, - cryptoService, platformUtilsService, storageService, messagingService, null); searchService = new SearchService(cipherService, platformUtilsService); +const lockService = new LockService(cipherService, folderService, collectionService, + cryptoService, platformUtilsService, storageService, messagingService, searchService, null); const syncService = new SyncService(userService, apiService, settingsService, folderService, cipherService, cryptoService, collectionService, storageService, messagingService, async (expired: boolean) => messagingService.send('logout', { expired: expired }));