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
@@ -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);
@@ -17,9 +17,9 @@
tools:layout_marginHorizontal="24dp">
<TextView
android:id="@+id/call_screen_call_link_warning_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/WebRtcCallView__anyone_who_joins"
android:textAppearance="@style/Signal.Text.BodySmall" />
</com.google.android.material.card.MaterialCardView>
+4 -2
View File
@@ -1862,8 +1862,10 @@
<string name="WebRtcCallView__disconnected">Disconnected</string>
<!-- Utilized in the lobby before joining a call link -->
<string name="WebRtcCallView__signal_call_link">Signal call link</string>
<!-- Warning displayed when entering a call via a link -->
<string name="WebRtcCallView__anyone_who_joins">Anyone who joins this call via the link will see your name, photo, and phone number.</string>
<!-- Warning displayed when entering a call via a link and you have Phone Number Privacy disabled-->
<string name="WebRtcCallView__anyone_who_joins_pnp_disabled">Anyone who joins this call via the link will see your name, photo, and phone number.</string>
<!-- Warning displayed when entering a call via a link and you have Phone Number Privacy enabled-->
<string name="WebRtcCallView__anyone_who_joins_pnp_enabled">Anyone who joins this call via the link will see your name and photo.</string>
<!-- Displayed on the call screen as the status when waiting to be let into a call link by an admin -->
<string name="WebRtcCallView__waiting_to_be_let_in">Waiting to be let in…</string>