1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

only sync on edit if they already have the item/folder

This commit is contained in:
Kyle Spearrin
2018-08-21 08:20:43 -04:00
parent 50666a761d
commit 9cfd693576
3 changed files with 26 additions and 20 deletions

View File

@@ -56,7 +56,8 @@ export class NotificationsService implements NotificationsServiceAbstraction {
switch (notification.type) {
case NotificationType.SyncCipherCreate:
case NotificationType.SyncCipherUpdate:
await this.syncService.syncUpsertCipher(notification.payload as SyncCipherNotification);
await this.syncService.syncUpsertCipher(notification.payload as SyncCipherNotification,
notification.type === NotificationType.SyncCipherUpdate);
break;
case NotificationType.SyncCipherDelete:
case NotificationType.SyncLoginDelete:
@@ -64,7 +65,8 @@ export class NotificationsService implements NotificationsServiceAbstraction {
break;
case NotificationType.SyncFolderCreate:
case NotificationType.SyncFolderUpdate:
await this.syncService.syncUpsertFolder(notification.payload as SyncFolderNotification);
await this.syncService.syncUpsertFolder(notification.payload as SyncFolderNotification,
notification.type === NotificationType.SyncFolderUpdate);
break;
case NotificationType.SyncFolderDelete:
await this.syncService.syncDeleteFolder(notification.payload as SyncFolderNotification);