mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-04 07:25:25 +01:00
Add new story-based AccountRecord fields and wiring.
This commit is contained in:
committed by
Greyson Parrelli
parent
b5300c877c
commit
4882a4d11c
@@ -166,6 +166,22 @@ public final class SignalAccountRecord implements SignalRecord {
|
||||
diff.add("SubscriptionManuallyCancelled");
|
||||
}
|
||||
|
||||
if (isKeepMutedChatsArchived() != that.isKeepMutedChatsArchived()) {
|
||||
diff.add("KeepMutedChatsArchived");
|
||||
}
|
||||
|
||||
if (hasSetMyStoriesPrivacy() != that.hasSetMyStoriesPrivacy()) {
|
||||
diff.add("HasSetMyStoryPrivacy");
|
||||
}
|
||||
|
||||
if (hasViewedOnboardingStory() != that.hasViewedOnboardingStory()) {
|
||||
diff.add("HasViewedOnboardingStory");
|
||||
}
|
||||
|
||||
if (isStoriesDisabled() != that.isStoriesDisabled()) {
|
||||
diff.add("StoriesDisabled");
|
||||
}
|
||||
|
||||
return diff.toString();
|
||||
} else {
|
||||
return "Different class. " + getClass().getSimpleName() + " | " + other.getClass().getSimpleName();
|
||||
@@ -268,6 +284,22 @@ public final class SignalAccountRecord implements SignalRecord {
|
||||
return proto.getSubscriptionManuallyCancelled();
|
||||
}
|
||||
|
||||
public boolean isKeepMutedChatsArchived() {
|
||||
return proto.getKeepMutedChatsArchived();
|
||||
}
|
||||
|
||||
public boolean hasSetMyStoriesPrivacy() {
|
||||
return proto.getHasSetMyStoriesPrivacy();
|
||||
}
|
||||
|
||||
public boolean hasViewedOnboardingStory() {
|
||||
return proto.getHasViewedOnboardingStory();
|
||||
}
|
||||
|
||||
public boolean isStoriesDisabled() {
|
||||
return proto.getStoriesDisabled();
|
||||
}
|
||||
|
||||
public AccountRecord toProto() {
|
||||
return proto;
|
||||
}
|
||||
@@ -605,6 +637,26 @@ public final class SignalAccountRecord implements SignalRecord {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setKeepMutedChatsArchived(boolean keepMutedChatsArchived) {
|
||||
builder.setKeepMutedChatsArchived(keepMutedChatsArchived);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setHasSetMyStoriesPrivacy(boolean hasSetMyStoriesPrivacy) {
|
||||
builder.setHasSetMyStoriesPrivacy(hasSetMyStoriesPrivacy);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setHasViewedOnboardingStory(boolean hasViewedOnboardingStory) {
|
||||
builder.setHasViewedOnboardingStory(hasViewedOnboardingStory);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStoriesDisabled(boolean storiesDisabled) {
|
||||
builder.setStoriesDisabled(storiesDisabled);
|
||||
return this;
|
||||
}
|
||||
|
||||
private static AccountRecord.Builder parseUnknowns(byte[] serializedUnknowns) {
|
||||
try {
|
||||
return AccountRecord.parseFrom(serializedUnknowns).toBuilder();
|
||||
|
||||
@@ -158,6 +158,10 @@ message AccountRecord {
|
||||
string subscriberCurrencyCode = 22;
|
||||
bool displayBadgesOnProfile = 23;
|
||||
bool subscriptionManuallyCancelled = 24;
|
||||
bool keepMutedChatsArchived = 25;
|
||||
bool hasSetMyStoriesPrivacy = 26;
|
||||
bool hasViewedOnboardingStory = 27;
|
||||
bool storiesDisabled = 28;
|
||||
}
|
||||
|
||||
message StoryDistributionListRecord {
|
||||
|
||||
Reference in New Issue
Block a user