mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 02:39:55 +01:00
Simplify storing storage-service-specific recipient values.
This gives us the ability to separate things we need for the Recipient class from things we only need for storage syncing. Not only does this simplify the storage service model building code (i.e. we no longer need to pass around a set of archived recipients), but it also eliminates a join on the Identity table for building regular recipients, which should help perf.
This commit is contained in:
@@ -102,8 +102,6 @@ public class Recipient {
|
||||
private final Capability groupsV2Capability;
|
||||
private final InsightsBannerTier insightsBannerTier;
|
||||
private final byte[] storageId;
|
||||
private final byte[] identityKey;
|
||||
private final VerifiedStatus identityStatus;
|
||||
private final MentionSetting mentionSetting;
|
||||
|
||||
|
||||
@@ -317,8 +315,6 @@ public class Recipient {
|
||||
this.uuidCapability = Capability.UNKNOWN;
|
||||
this.groupsV2Capability = Capability.UNKNOWN;
|
||||
this.storageId = null;
|
||||
this.identityKey = null;
|
||||
this.identityStatus = VerifiedStatus.DEFAULT;
|
||||
this.mentionSetting = MentionSetting.ALWAYS_NOTIFY;
|
||||
}
|
||||
|
||||
@@ -361,8 +357,6 @@ public class Recipient {
|
||||
this.uuidCapability = details.uuidCapability;
|
||||
this.groupsV2Capability = details.groupsV2Capability;
|
||||
this.storageId = details.storageId;
|
||||
this.identityKey = details.identityKey;
|
||||
this.identityStatus = details.identityStatus;
|
||||
this.mentionSetting = details.mentionSetting;
|
||||
}
|
||||
|
||||
@@ -782,14 +776,6 @@ public class Recipient {
|
||||
return storageId;
|
||||
}
|
||||
|
||||
public @NonNull VerifiedStatus getIdentityVerifiedStatus() {
|
||||
return identityStatus;
|
||||
}
|
||||
|
||||
public @Nullable byte[] getIdentityKey() {
|
||||
return identityKey;
|
||||
}
|
||||
|
||||
public @NonNull UnidentifiedAccessMode getUnidentifiedAccessMode() {
|
||||
return unidentifiedAccessMode;
|
||||
}
|
||||
|
||||
@@ -65,9 +65,7 @@ public class RecipientDetails {
|
||||
final Recipient.Capability uuidCapability;
|
||||
final Recipient.Capability groupsV2Capability;
|
||||
final InsightsBannerTier insightsBannerTier;
|
||||
final byte[] storageId;
|
||||
final byte[] identityKey;
|
||||
final VerifiedStatus identityStatus;
|
||||
final byte[] storageId;
|
||||
final MentionSetting mentionSetting;
|
||||
|
||||
public RecipientDetails(@Nullable String name,
|
||||
@@ -113,8 +111,6 @@ public class RecipientDetails {
|
||||
this.groupsV2Capability = settings.getGroupsV2Capability();
|
||||
this.insightsBannerTier = settings.getInsightsBannerTier();
|
||||
this.storageId = settings.getStorageId();
|
||||
this.identityKey = settings.getIdentityKey();
|
||||
this.identityStatus = settings.getIdentityStatus();
|
||||
this.mentionSetting = settings.getMentionSetting();
|
||||
|
||||
if (name == null) this.name = settings.getSystemDisplayName();
|
||||
@@ -162,8 +158,6 @@ public class RecipientDetails {
|
||||
this.uuidCapability = Recipient.Capability.UNKNOWN;
|
||||
this.groupsV2Capability = Recipient.Capability.UNKNOWN;
|
||||
this.storageId = null;
|
||||
this.identityKey = null;
|
||||
this.identityStatus = VerifiedStatus.DEFAULT;
|
||||
this.mentionSetting = MentionSetting.ALWAYS_NOTIFY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user