mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-26 14:09:58 +00:00
Update design for who can find me fragment.
This commit is contained in:
committed by
Nicholas Tinsley
parent
a9c4fcf894
commit
ca8add87c6
@@ -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
|
||||
@@ -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))
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user