mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Inline the pnp feature flag.
This commit is contained in:
committed by
Cody Henthorne
parent
8ad77ac7aa
commit
c359ddf3c8
@@ -209,17 +209,15 @@ public class CreateProfileFragment extends LoggingFragment {
|
||||
binding.profileDescriptionText.setLinkColor(ContextCompat.getColor(requireContext(), R.color.signal_colorPrimary));
|
||||
binding.profileDescriptionText.setOnLinkClickListener(v -> CommunicationActions.openBrowserLink(requireContext(), getString(R.string.EditProfileFragment__support_link)));
|
||||
|
||||
if (FeatureFlags.phoneNumberPrivacy()) {
|
||||
getParentFragmentManager().setFragmentResultListener(WhoCanFindMeByPhoneNumberFragment.REQUEST_KEY, getViewLifecycleOwner(), (requestKey, result) -> {
|
||||
if (WhoCanFindMeByPhoneNumberFragment.REQUEST_KEY.equals(requestKey)) {
|
||||
presentWhoCanFindMeDescription(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode());
|
||||
}
|
||||
});
|
||||
getParentFragmentManager().setFragmentResultListener(WhoCanFindMeByPhoneNumberFragment.REQUEST_KEY, getViewLifecycleOwner(), (requestKey, result) -> {
|
||||
if (WhoCanFindMeByPhoneNumberFragment.REQUEST_KEY.equals(requestKey)) {
|
||||
presentWhoCanFindMeDescription(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode());
|
||||
}
|
||||
});
|
||||
|
||||
binding.whoCanFindMeContainer.setVisibility(View.VISIBLE);
|
||||
binding.whoCanFindMeContainer.setOnClickListener(v -> SafeNavigation.safeNavigate(Navigation.findNavController(v), CreateProfileFragmentDirections.actionCreateProfileFragmentToPhoneNumberPrivacy()));
|
||||
presentWhoCanFindMeDescription(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode());
|
||||
}
|
||||
binding.whoCanFindMeContainer.setVisibility(View.VISIBLE);
|
||||
binding.whoCanFindMeContainer.setOnClickListener(v -> SafeNavigation.safeNavigate(Navigation.findNavController(v), CreateProfileFragmentDirections.actionCreateProfileFragmentToPhoneNumberPrivacy()));
|
||||
presentWhoCanFindMeDescription(SignalStore.phoneNumberPrivacy().getPhoneNumberDiscoverabilityMode());
|
||||
}
|
||||
|
||||
binding.finishButton.setOnClickListener(v -> {
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.thoughtcrime.securesms.components.settings.DSLSettingsFragment
|
||||
import org.thoughtcrime.securesms.components.settings.DSLSettingsText
|
||||
import org.thoughtcrime.securesms.components.settings.configure
|
||||
import org.thoughtcrime.securesms.databinding.WhoCanFindMeByPhoneNumberFragmentBinding
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
||||
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
|
||||
|
||||
/**
|
||||
@@ -38,8 +37,6 @@ class WhoCanFindMeByPhoneNumberFragment : DSLSettingsFragment(
|
||||
private val binding by ViewBinderDelegate(WhoCanFindMeByPhoneNumberFragmentBinding::bind)
|
||||
|
||||
override fun bindAdapter(adapter: MappingAdapter) {
|
||||
require(FeatureFlags.phoneNumberPrivacy())
|
||||
|
||||
lifecycleDisposable += viewModel.state.subscribe {
|
||||
adapter.submitList(getConfiguration(it).toMappingModelList())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user