Don't clear contact store before receiving new sync contacts

This commit is contained in:
AsamK 2021-05-01 15:03:18 +02:00
parent a05a24873a
commit 08962fd1dc

View file

@ -1995,9 +1995,6 @@ public class Manager implements Closeable {
try (var attachmentAsStream = retrieveAttachmentAsStream(contactsMessage.getContactsStream() try (var attachmentAsStream = retrieveAttachmentAsStream(contactsMessage.getContactsStream()
.asPointer(), tmpFile)) { .asPointer(), tmpFile)) {
var s = new DeviceContactsInputStream(attachmentAsStream); var s = new DeviceContactsInputStream(attachmentAsStream);
if (contactsMessage.isComplete()) {
account.getContactStore().clear();
}
DeviceContact c; DeviceContact c;
while ((c = s.read()) != null) { while ((c = s.read()) != null) {
if (c.getAddress().matches(account.getSelfAddress()) && c.getProfileKey().isPresent()) { if (c.getAddress().matches(account.getSelfAddress()) && c.getProfileKey().isPresent()) {