Execute remote sync if local items were pushed

This commit is contained in:
vishnukvmd 2022-11-22 13:56:00 +05:30
parent a573c012e0
commit 9143634000

View file

@ -59,11 +59,12 @@ class AuthenticatorService {
key,
Sodium.base642bin(e.header),
);
final hasSynced = !(e.id == null || e.shouldSync);
entities.add(
EntityResult(
e.generatedID,
utf8.decode(decryptedValue),
e.id != null,
hasSynced,
),
);
} catch (e, s) {
@ -197,6 +198,9 @@ class AuthenticatorService {
await _db.updateLocalEntity(entity.copyWith(shouldSync: false));
}
}
if (pendingUpdate.isNotEmpty) {
await _remoteToLocalSync();
}
}
Future<Uint8List> getOrCreateAuthDataKey() async {