Skip to content

Commit

Permalink
Update design for who can find me fragment.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-signal authored and nicholas-signal committed Mar 3, 2023
1 parent a9c4fcf commit ca8add8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
@@ -1,6 +1,7 @@
package org.thoughtcrime.securesms.profiles.edit.pnp

import android.os.Bundle
import androidx.core.content.ContextCompat
import androidx.fragment.app.setFragmentResult
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
Expand Down Expand Up @@ -56,17 +57,26 @@ class WhoCanSeeMyPhoneNumberFragment : DSLSettingsFragment(
return configure {
radioPref(
title = DSLSettingsText.from(R.string.PhoneNumberPrivacy_everyone),
summary = DSLSettingsText.from(R.string.WhoCanSeeMyPhoneNumberFragment__anyone_who_has),
isChecked = state == WhoCanSeeMyPhoneNumberState.EVERYONE,
onClick = { viewModel.onEveryoneCanSeeMyPhoneNumberSelected() }
)

radioPref(
title = DSLSettingsText.from(R.string.PhoneNumberPrivacy_nobody),
summary = DSLSettingsText.from(R.string.WhoCanSeeMyPhoneNumberFragment__nobody_on_signal),
isChecked = state == WhoCanSeeMyPhoneNumberState.NOBODY,
onClick = { viewModel.onNobodyCanSeeMyPhoneNumberSelected() }
)

textPref(
title = DSLSettingsText.from(
when (state) {
WhoCanSeeMyPhoneNumberState.EVERYONE -> R.string.WhoCanSeeMyPhoneNumberFragment__anyone_who_has
WhoCanSeeMyPhoneNumberState.NOBODY -> R.string.WhoCanSeeMyPhoneNumberFragment__nobody_on_signal
},
DSLSettingsText.TextAppearanceModifier(R.style.Signal_Text_BodyMedium),
DSLSettingsText.ColorModifier(ContextCompat.getColor(requireContext(), R.color.signal_colorOnSurfaceVariant))
)
)
}
}
}
Expand Up @@ -179,6 +179,7 @@ public final class FeatureFlags {
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
@VisibleForTesting
static final Map<String, Object> FORCED_VALUES = new HashMap<String, Object>() {{
put(PHONE_NUMBER_PRIVACY, true);
}};

/**
Expand Down
Expand Up @@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dsl_settings_gutter"
android:layout_marginBottom="16dp"
android:text="@string/save"
android:text="@string/RegistrationActivity_next"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit ca8add8

Please sign in to comment.