chore: only invalidate vault user cache when required (#2519)

This commit is contained in:
Aman Harwara
2023-09-20 17:20:30 +05:30
committed by GitHub
parent 3a42925ca2
commit e2901d9535
8 changed files with 80 additions and 22 deletions

View File

@@ -469,6 +469,7 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
source: SyncSource.External,
sourceDescription: 'Application Launch',
})
this.vaultUsers.invalidateVaultUsersCache().catch(console.error)
})
.catch((error) => {
void this.notifyEvent(ApplicationEvent.LocalDatabaseReadError, error)

View File

@@ -43,7 +43,6 @@ export function RegisterApplicationServicesEvents(container: Dependencies, event
events.addEventHandler(container.get(TYPES.VaultInviteService), ApplicationEvent.Launched)
events.addEventHandler(container.get(TYPES.VaultInviteService), SyncEvent.ReceivedSharedVaultInvites)
events.addEventHandler(container.get(TYPES.VaultInviteService), WebSocketsServiceEvent.UserInvitedToSharedVault)
events.addEventHandler(container.get(TYPES.VaultUserService), ApplicationEvent.CompletedFullSync)
if (container.get(TYPES.FilesBackupService)) {
events.addEventHandler(container.get(TYPES.FilesBackupService), ApplicationEvent.ApplicationStageChanged)