-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-7400] Fixed issue with clearing search index state #8686
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8686 +/- ##
=======================================
Coverage 27.20% 27.20%
=======================================
Files 2339 2339
Lines 68267 68263 -4
Branches 12749 12748 -1
=======================================
Hits 18570 18570
+ Misses 48301 48297 -4
Partials 1396 1396 ☔ View full report in Codecov by Sentry. |
No New Or Fixed Issues Found |
* Fix flashing banner for users who shouldn't see it * Emit the right value the first time * simplify further * restore comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is is possible to just add the "logout"
option to the user key definitions of all the state being cleared inside of clearIndex
? That would take care of making sure the state for the correct user is being cleared. As this currently stands, it will clear the state for the currently active user even if a user that isn't currently active is in the process of being logged out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that you've got the clearing setup through the UserKeyDefinition
I think you can delete that method altogether, both the call sites and the definition.
@@ -1171,6 +1171,7 @@ export default class MainBackground { | |||
this.vaultTimeoutSettingsService.clear(userId), | |||
this.vaultFilterService.clear(), | |||
this.biometricStateService.logout(userId), | |||
this.searchService.clearIndex(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can safely remove this now that you have the option defined in clearOn
.
@@ -587,6 +587,7 @@ export class AppComponent implements OnInit, OnDestroy { | |||
await this.passwordGenerationService.clear(userBeingLoggedOut); | |||
await this.vaultTimeoutSettingsService.clear(userBeingLoggedOut); | |||
await this.biometricStateService.logout(userBeingLoggedOut as UserId); | |||
await this.searchService.clearIndex(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one too.
Type of change
Objective
Code changes
Screenshots
Before you submit