GroupId for GV2.

This commit is contained in:
Alan Evans
2020-03-27 11:28:48 -03:00
committed by GitHub
parent d8fa46c558
commit 66c7f8bcb2
10 changed files with 358 additions and 62 deletions

View File

@@ -197,7 +197,7 @@ public final class LiveRecipient {
List<Recipient> members = Stream.of(groupRecord.get().getMembers()).filterNot(RecipientId::isUnknown).map(this::fetchRecipientFromDisk).toList();
Optional<Long> avatarId = Optional.absent();
if (settings.getGroupId() != null && !settings.getGroupId().isMmsGroup() && title == null) {
if (settings.getGroupId() != null && settings.getGroupId().isPush() && title == null) {
title = unnamedGroupName;
}

View File

@@ -381,7 +381,7 @@ public class Recipient {
}
public @Nullable String getName(@NonNull Context context) {
if (this.name == null && groupId != null && groupId.isMmsGroup()) {
if (this.name == null && groupId != null && groupId.isMms()) {
List<String> names = new LinkedList<>();
for (Recipient recipient : participants) {
@@ -567,12 +567,12 @@ public class Recipient {
public boolean isMmsGroup() {
GroupId groupId = resolve().groupId;
return groupId != null && groupId.isMmsGroup();
return groupId != null && groupId.isMms();
}
public boolean isPushGroup() {
GroupId groupId = resolve().groupId;
return groupId != null && !groupId.isMmsGroup();
return groupId != null && groupId.isPush();
}
public @NonNull List<Recipient> getParticipants() {