Ensure lastSyncTime is updated before resyncing the vault (#4375)

This commit is contained in:
David Perez
2024-11-25 09:03:58 -06:00
committed by GitHub
parent 8e7ec7af4c
commit cce9befe8c

View File

@@ -1352,11 +1352,11 @@ class VaultRepositoryImpl(
if (serverRevisionDate < lastSyncTimeMs) {
// We can skip the actual sync call if there is no new data or
// database scheme changes since the last sync.
vaultDiskSource.resyncVaultData(userId = userId)
settingsDiskSource.storeLastSyncTime(
userId = userId,
lastSyncTime = clock.instant(),
)
vaultDiskSource.resyncVaultData(userId = userId)
val itemsAvailable = vaultDiskSource
.getCiphers(userId)
.firstOrNull()