mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-22 12:08:34 +00:00
Add support for new group story display states.
This commit is contained in:
committed by
Cody Henthorne
parent
8ca94eb3d5
commit
c47a724654
@@ -82,6 +82,10 @@ public final class SignalGroupV2Record implements SignalRecord {
|
||||
diff.add("HideStory");
|
||||
}
|
||||
|
||||
if (!Objects.equals(this.getStorySendMode(), that.getStorySendMode())) {
|
||||
diff.add("StorySendMode");
|
||||
}
|
||||
|
||||
if (!Objects.equals(this.hasUnknownFields(), that.hasUnknownFields())) {
|
||||
diff.add("UnknownFields");
|
||||
}
|
||||
@@ -140,6 +144,10 @@ public final class SignalGroupV2Record implements SignalRecord {
|
||||
return proto.getHideStory();
|
||||
}
|
||||
|
||||
public GroupV2Record.StorySendMode getStorySendMode() {
|
||||
return proto.getStorySendMode();
|
||||
}
|
||||
|
||||
public GroupV2Record toProto() {
|
||||
return proto;
|
||||
}
|
||||
@@ -213,6 +221,11 @@ public final class SignalGroupV2Record implements SignalRecord {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setStorySendMode(GroupV2Record.StorySendMode storySendMode) {
|
||||
builder.setStorySendMode(storySendMode);
|
||||
return this;
|
||||
}
|
||||
|
||||
private static GroupV2Record.Builder parseUnknowns(byte[] serializedUnknowns) {
|
||||
try {
|
||||
return GroupV2Record.parseFrom(serializedUnknowns).toBuilder();
|
||||
|
||||
@@ -100,14 +100,22 @@ message GroupV1Record {
|
||||
}
|
||||
|
||||
message GroupV2Record {
|
||||
bytes masterKey = 1;
|
||||
bool blocked = 2;
|
||||
bool whitelisted = 3;
|
||||
bool archived = 4;
|
||||
bool markedUnread = 5;
|
||||
uint64 mutedUntilTimestamp = 6;
|
||||
bool dontNotifyForMentionsIfMuted = 7;
|
||||
bool hideStory = 8;
|
||||
enum StorySendMode {
|
||||
DEFAULT = 0;
|
||||
DISABLED = 1;
|
||||
ENABLED = 2;
|
||||
}
|
||||
|
||||
bytes masterKey = 1;
|
||||
bool blocked = 2;
|
||||
bool whitelisted = 3;
|
||||
bool archived = 4;
|
||||
bool markedUnread = 5;
|
||||
uint64 mutedUntilTimestamp = 6;
|
||||
bool dontNotifyForMentionsIfMuted = 7;
|
||||
bool hideStory = 8;
|
||||
reserved /* storySendEnabled */ 9;
|
||||
StorySendMode storySendMode = 10;
|
||||
}
|
||||
|
||||
message Payments {
|
||||
|
||||
Reference in New Issue
Block a user