mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 03:40:56 +01:00
Remove deprecated blocked field from DeviceContact.
This commit is contained in:
committed by
Cody Henthorne
parent
0544c1f249
commit
aeae6ac292
@@ -23,7 +23,6 @@ public class DeviceContact {
|
||||
private final Optional<String> color;
|
||||
private final Optional<VerifiedMessage> verified;
|
||||
private final Optional<ProfileKey> profileKey;
|
||||
private final boolean blocked;
|
||||
private final Optional<Integer> expirationTimer;
|
||||
private final Optional<Integer> inboxPosition;
|
||||
private final boolean archived;
|
||||
@@ -35,7 +34,6 @@ public class DeviceContact {
|
||||
Optional<String> color,
|
||||
Optional<VerifiedMessage> verified,
|
||||
Optional<ProfileKey> profileKey,
|
||||
boolean blocked,
|
||||
Optional<Integer> expirationTimer,
|
||||
Optional<Integer> inboxPosition,
|
||||
boolean archived)
|
||||
@@ -51,7 +49,6 @@ public class DeviceContact {
|
||||
this.color = color;
|
||||
this.verified = verified;
|
||||
this.profileKey = profileKey;
|
||||
this.blocked = blocked;
|
||||
this.expirationTimer = expirationTimer;
|
||||
this.inboxPosition = inboxPosition;
|
||||
this.archived = archived;
|
||||
@@ -85,10 +82,6 @@ public class DeviceContact {
|
||||
return profileKey;
|
||||
}
|
||||
|
||||
public boolean isBlocked() {
|
||||
return blocked;
|
||||
}
|
||||
|
||||
public Optional<Integer> getExpirationTimer() {
|
||||
return expirationTimer;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ public class DeviceContactsInputStream extends ChunkedInputStream {
|
||||
Optional<String> color = details.color != null ? Optional.of(details.color) : Optional.empty();
|
||||
Optional<VerifiedMessage> verified = Optional.empty();
|
||||
Optional<ProfileKey> profileKey = Optional.empty();
|
||||
boolean blocked = false;
|
||||
Optional<Integer> expireTimer = Optional.empty();
|
||||
Optional<Integer> inboxPosition = Optional.empty();
|
||||
boolean archived = false;
|
||||
@@ -107,10 +106,9 @@ public class DeviceContactsInputStream extends ChunkedInputStream {
|
||||
inboxPosition = Optional.of(details.inboxPosition);
|
||||
}
|
||||
|
||||
blocked = details.blocked;
|
||||
archived = details.archived;
|
||||
|
||||
return new DeviceContact(aci, e164, name, avatar, color, verified, profileKey, blocked, expireTimer, inboxPosition, archived);
|
||||
return new DeviceContact(aci, e164, name, avatar, color, verified, profileKey, expireTimer, inboxPosition, archived);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -93,7 +93,6 @@ public class DeviceContactsOutputStream extends ChunkedOutputStream {
|
||||
contactDetails.inboxPosition(contact.getInboxPosition().get());
|
||||
}
|
||||
|
||||
contactDetails.blocked(contact.isBlocked());
|
||||
contactDetails.archived(contact.isArchived());
|
||||
|
||||
byte[] serializedContactDetails = contactDetails.build().encode();
|
||||
|
||||
@@ -741,7 +741,7 @@ message ContactDetails {
|
||||
optional string color = 4;
|
||||
optional Verified verified = 5;
|
||||
optional bytes profileKey = 6;
|
||||
optional bool blocked = 7;
|
||||
reserved /*blocked*/ 7;
|
||||
optional uint32 expireTimer = 8;
|
||||
optional uint32 inboxPosition = 10;
|
||||
optional bool archived = 11;
|
||||
|
||||
@@ -38,7 +38,6 @@ public class DeviceContactsInputStreamTest {
|
||||
Optional.of("ultramarine"),
|
||||
Optional.of(new VerifiedMessage(new SignalServiceAddress(aciFirst.get(), e164First), generateIdentityKey(), VerifiedMessage.VerifiedState.DEFAULT, System.currentTimeMillis())),
|
||||
Optional.of(generateProfileKey()),
|
||||
false,
|
||||
Optional.of(0),
|
||||
Optional.of(0),
|
||||
false
|
||||
@@ -52,7 +51,6 @@ public class DeviceContactsInputStreamTest {
|
||||
Optional.of("ultramarine"),
|
||||
Optional.of(new VerifiedMessage(new SignalServiceAddress(aciSecond.get(), e164Second), generateIdentityKey(), VerifiedMessage.VerifiedState.DEFAULT, System.currentTimeMillis())),
|
||||
Optional.of(generateProfileKey()),
|
||||
false,
|
||||
Optional.of(0),
|
||||
Optional.of(0),
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user