mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-26 14:09:58 +00:00
Support syncing dontNotifyIfMuted on GV2Records.
This commit is contained in:
@@ -74,6 +74,10 @@ public final class SignalGroupV2Record implements SignalRecord {
|
||||
diff.add("MuteUntil");
|
||||
}
|
||||
|
||||
if (!Objects.equals(this.notifyForMentionsWhenMuted(), that.notifyForMentionsWhenMuted())) {
|
||||
diff.add("NotifyForMentionsWhenMuted");
|
||||
}
|
||||
|
||||
if (!Objects.equals(this.hasUnknownFields(), that.hasUnknownFields())) {
|
||||
diff.add("UnknownFields");
|
||||
}
|
||||
@@ -124,6 +128,10 @@ public final class SignalGroupV2Record implements SignalRecord {
|
||||
return proto.getMutedUntilTimestamp();
|
||||
}
|
||||
|
||||
public boolean notifyForMentionsWhenMuted() {
|
||||
return !proto.getDontNotifyForMentionsIfMuted();
|
||||
}
|
||||
|
||||
|
||||
GroupV2Record toProto() {
|
||||
return proto;
|
||||
@@ -188,6 +196,11 @@ public final class SignalGroupV2Record implements SignalRecord {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setNotifyForMentionsWhenMuted(boolean value) {
|
||||
builder.setDontNotifyForMentionsIfMuted(!value);
|
||||
return this;
|
||||
}
|
||||
|
||||
private static GroupV2Record.Builder parseUnknowns(byte[] serializedUnknowns) {
|
||||
try {
|
||||
return GroupV2Record.parseFrom(serializedUnknowns).toBuilder();
|
||||
|
||||
@@ -94,12 +94,13 @@ message GroupV1Record {
|
||||
}
|
||||
|
||||
message GroupV2Record {
|
||||
bytes masterKey = 1;
|
||||
bool blocked = 2;
|
||||
bool whitelisted = 3;
|
||||
bool archived = 4;
|
||||
bool markedUnread = 5;
|
||||
uint64 mutedUntilTimestamp = 6;
|
||||
bytes masterKey = 1;
|
||||
bool blocked = 2;
|
||||
bool whitelisted = 3;
|
||||
bool archived = 4;
|
||||
bool markedUnread = 5;
|
||||
uint64 mutedUntilTimestamp = 6;
|
||||
bool dontNotifyForMentionsIfMuted = 7;
|
||||
}
|
||||
|
||||
message Payments {
|
||||
|
||||
Reference in New Issue
Block a user