kopia lustrzana https://github.com/ryukoposting/Signal-Android
Don't create identity change methods for brand new contacts.
rodzic
dc7c54a1f8
commit
bb6ca80d5a
|
@ -146,6 +146,7 @@ public class IdentityDatabase extends Database {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateIdentityAfterSync(@NonNull RecipientId id, IdentityKey identityKey, VerifiedStatus verifiedStatus) {
|
public void updateIdentityAfterSync(@NonNull RecipientId id, IdentityKey identityKey, VerifiedStatus verifiedStatus) {
|
||||||
|
boolean hadEntry = getIdentity(id).isPresent();
|
||||||
boolean keyMatches = hasMatchingKey(id, identityKey);
|
boolean keyMatches = hasMatchingKey(id, identityKey);
|
||||||
boolean statusMatches = keyMatches && hasMatchingStatus(id, identityKey, verifiedStatus);
|
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 (record.isPresent()) EventBus.getDefault().post(record.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!keyMatches) {
|
if (hadEntry && !keyMatches) {
|
||||||
IdentityUtil.markIdentityUpdate(context, id);
|
IdentityUtil.markIdentityUpdate(context, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue