Fix some storage service consistency issues.

This commit is contained in:
Greyson Parrelli
2020-04-24 18:37:12 -04:00
parent 33874a8866
commit 575caa53d3
4 changed files with 9 additions and 8 deletions

View File

@@ -1174,13 +1174,9 @@ public class RecipientDatabase extends Database {
@Deprecated
public void setRegistered(@NonNull RecipientId id, RegisteredState registeredState) {
ContentValues contentValues = new ContentValues(2);
ContentValues contentValues = new ContentValues(1);
contentValues.put(REGISTERED, registeredState.getId());
if (registeredState == RegisteredState.REGISTERED) {
contentValues.put(STORAGE_SERVICE_ID, Base64.encodeBytes(StorageSyncHelper.generateKey()));
}
if (update(id, contentValues)) {
if (registeredState == RegisteredState.REGISTERED) {
markDirty(id, DirtyState.INSERT);