mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Periodically fetch release notes.
This commit is contained in:
@@ -214,10 +214,10 @@ public final class LiveRecipient {
|
||||
avatarId = Optional.of(groupRecord.get().getAvatarId());
|
||||
}
|
||||
|
||||
return new RecipientDetails(title, null, avatarId, false, false, settings.getRegistered(), settings, members);
|
||||
return new RecipientDetails(title, null, avatarId, false, false, settings.getRegistered(), settings, members, false);
|
||||
}
|
||||
|
||||
return new RecipientDetails(null, null, Optional.absent(), false, false, settings.getRegistered(), settings, null);
|
||||
return new RecipientDetails(null, null, Optional.absent(), false, false, settings.getRegistered(), settings, null, false);
|
||||
}
|
||||
|
||||
synchronized void set(@NonNull Recipient recipient) {
|
||||
|
||||
@@ -439,7 +439,7 @@ public class Recipient {
|
||||
this.extras = details.extras;
|
||||
this.hasGroupsInCommon = details.hasGroupsInCommon;
|
||||
this.badges = details.badges;
|
||||
this.isReleaseNotesRecipient = false;
|
||||
this.isReleaseNotesRecipient = details.isReleaseChannel;
|
||||
}
|
||||
|
||||
public @NonNull RecipientId getId() {
|
||||
|
||||
@@ -83,6 +83,7 @@ public class RecipientDetails {
|
||||
final Optional<Recipient.Extras> extras;
|
||||
final boolean hasGroupsInCommon;
|
||||
final List<Badge> badges;
|
||||
final boolean isReleaseChannel;
|
||||
|
||||
public RecipientDetails(@Nullable String groupName,
|
||||
@Nullable String systemContactName,
|
||||
@@ -91,7 +92,8 @@ public class RecipientDetails {
|
||||
boolean isSelf,
|
||||
@NonNull RegisteredState registeredState,
|
||||
@NonNull RecipientRecord record,
|
||||
@Nullable List<Recipient> participants)
|
||||
@Nullable List<Recipient> participants,
|
||||
boolean isReleaseChannel)
|
||||
{
|
||||
this.groupAvatarId = groupAvatarId;
|
||||
this.systemContactPhoto = Util.uri(record.getSystemContactPhotoUri());
|
||||
@@ -144,6 +146,7 @@ public class RecipientDetails {
|
||||
this.extras = Optional.fromNullable(record.getExtras());
|
||||
this.hasGroupsInCommon = record.hasGroupsInCommon();
|
||||
this.badges = record.getBadges();
|
||||
this.isReleaseChannel = isReleaseChannel;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,12 +204,14 @@ public class RecipientDetails {
|
||||
this.extras = Optional.absent();
|
||||
this.hasGroupsInCommon = false;
|
||||
this.badges = Collections.emptyList();
|
||||
this.isReleaseChannel = false;
|
||||
}
|
||||
|
||||
public static @NonNull RecipientDetails forIndividual(@NonNull Context context, @NonNull RecipientRecord settings) {
|
||||
boolean systemContact = !settings.getSystemProfileName().isEmpty();
|
||||
boolean isSelf = (settings.getE164() != null && settings.getE164().equals(SignalStore.account().getE164())) ||
|
||||
(settings.getAci() != null && settings.getAci().equals(SignalStore.account().getAci()));
|
||||
boolean systemContact = !settings.getSystemProfileName().isEmpty();
|
||||
boolean isSelf = (settings.getE164() != null && settings.getE164().equals(SignalStore.account().getE164())) ||
|
||||
(settings.getAci() != null && settings.getAci().equals(SignalStore.account().getAci()));
|
||||
boolean isReleaseChannel = settings.getId().equals(SignalStore.releaseChannelValues().getReleaseChannelRecipientId());
|
||||
|
||||
RegisteredState registeredState = settings.getRegistered();
|
||||
|
||||
@@ -218,6 +223,6 @@ public class RecipientDetails {
|
||||
}
|
||||
}
|
||||
|
||||
return new RecipientDetails(null, settings.getSystemDisplayName(), Optional.absent(), systemContact, isSelf, registeredState, settings, null);
|
||||
return new RecipientDetails(null, settings.getSystemDisplayName(), Optional.absent(), systemContact, isSelf, registeredState, settings, null, isReleaseChannel);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user