Don't create identity change methods for brand new contacts.

fork-5.53.8
Greyson Parrelli 2020-05-20 17:10:14 -04:00 zatwierdzone przez Alex Hart
rodzic dc7c54a1f8
commit bb6ca80d5a
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -146,6 +146,7 @@ public class IdentityDatabase extends Database {
}
public void updateIdentityAfterSync(@NonNull RecipientId id, IdentityKey identityKey, VerifiedStatus verifiedStatus) {
boolean hadEntry = getIdentity(id).isPresent();
boolean keyMatches = hasMatchingKey(id, identityKey);
boolean statusMatches = keyMatches && hasMatchingStatus(id, identityKey, verifiedStatus);
@ -155,7 +156,7 @@ public class IdentityDatabase extends Database {
if (record.isPresent()) EventBus.getDefault().post(record.get());
}
if (!keyMatches) {
if (hadEntry && !keyMatches) {
IdentityUtil.markIdentityUpdate(context, id);
}
}