Adjust copy depending on PNP settings.

This commit is contained in:
Nicholas Tinsley
2024-02-21 13:11:39 -05:00
committed by Greyson Parrelli
parent d555370076
commit 8c35628863
3 changed files with 13 additions and 4 deletions

View File

@@ -53,6 +53,7 @@ import org.thoughtcrime.securesms.contacts.avatars.ContactPhoto;
import org.thoughtcrime.securesms.contacts.avatars.ProfileContactPhoto;
import org.thoughtcrime.securesms.events.CallParticipant;
import org.thoughtcrime.securesms.events.WebRtcViewModel;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.RecipientId;
import org.thoughtcrime.securesms.ringrtc.CameraState;
@@ -441,7 +442,13 @@ public class WebRtcCallView extends InsetAwareConstraintLayout {
if (state.getGroupCallState().isNotIdle()) {
if (state.getCallState() == WebRtcViewModel.State.CALL_PRE_JOIN) {
callLinkWarningCard.setVisibility(callParticipantsViewState.isStartedFromCallLink() ? View.VISIBLE : View.GONE);
if (callParticipantsViewState.isStartedFromCallLink()) {
TextView warningTextView = callLinkWarningCard.get().findViewById(R.id.call_screen_call_link_warning_textview);
warningTextView.setText(SignalStore.phoneNumberPrivacy().isPhoneNumberSharingEnabled() ? R.string.WebRtcCallView__anyone_who_joins_pnp_enabled : R.string.WebRtcCallView__anyone_who_joins_pnp_disabled);
callLinkWarningCard.setVisibility(View.VISIBLE);
} else {
callLinkWarningCard.setVisibility(View.GONE);
}
setStatus(state.getPreJoinGroupDescription(getContext()));
} else if (state.getCallState() == WebRtcViewModel.State.CALL_CONNECTED && state.isInOutgoingRingingMode()) {
callLinkWarningCard.setVisibility(View.GONE);