mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Always show verify safety numbers option.
This commit is contained in:
@@ -543,16 +543,14 @@ class ConversationSettingsFragment : DSLSettingsFragment(
|
||||
}
|
||||
}
|
||||
|
||||
if (recipientState.identityRecord != null) {
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.ConversationSettingsFragment__view_safety_number),
|
||||
icon = DSLSettingsIcon.from(R.drawable.ic_safety_number_24),
|
||||
isEnabled = !state.isDeprecatedOrUnregistered,
|
||||
onClick = {
|
||||
VerifyIdentityActivity.startOrShowExchangeMessagesDialog(requireActivity(), recipientState.identityRecord)
|
||||
}
|
||||
)
|
||||
}
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.ConversationSettingsFragment__view_safety_number),
|
||||
icon = DSLSettingsIcon.from(R.drawable.ic_safety_number_24),
|
||||
isEnabled = !state.isDeprecatedOrUnregistered,
|
||||
onClick = {
|
||||
VerifyIdentityActivity.startOrShowExchangeMessagesDialog(requireActivity(), recipientState.identityRecord)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (state.sharedMedia != null && state.sharedMedia.count > 0) {
|
||||
|
||||
@@ -314,14 +314,11 @@ public final class RecipientBottomSheetDialogFragment extends BottomSheetDialogF
|
||||
});
|
||||
|
||||
viewModel.getIdentity().observe(getViewLifecycleOwner(), identityRecord -> {
|
||||
viewSafetyNumberButton.setVisibility(identityRecord != null ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (identityRecord != null) {
|
||||
viewSafetyNumberButton.setOnClickListener(view -> {
|
||||
dismiss();
|
||||
viewModel.onViewSafetyNumberClicked(requireActivity(), identityRecord);
|
||||
});
|
||||
}
|
||||
viewSafetyNumberButton.setVisibility(View.VISIBLE);
|
||||
viewSafetyNumberButton.setOnClickListener(view -> {
|
||||
dismiss();
|
||||
viewModel.onViewSafetyNumberClicked(requireActivity(), identityRecord);
|
||||
});
|
||||
});
|
||||
|
||||
avatar.setOnClickListener(view -> {
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
@@ -35,8 +36,12 @@ public class VerifyIdentityActivity extends PassphraseRequiredActivity {
|
||||
private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme();
|
||||
|
||||
public static void startOrShowExchangeMessagesDialog(@NonNull Context context,
|
||||
@NonNull IdentityRecord identityRecord) {
|
||||
startOrShowExchangeMessagesDialog(context, identityRecord.getRecipientId(), identityRecord.getIdentityKey(), identityRecord.getVerifiedStatus() == IdentityTable.VerifiedStatus.VERIFIED);
|
||||
@Nullable IdentityRecord identityRecord) {
|
||||
if (identityRecord != null) {
|
||||
startOrShowExchangeMessagesDialog(context, identityRecord.getRecipientId(), identityRecord.getIdentityKey(), identityRecord.getVerifiedStatus() == IdentityTable.VerifiedStatus.VERIFIED);
|
||||
} else {
|
||||
showExchangeMessagesDialog(context);
|
||||
}
|
||||
}
|
||||
|
||||
public static void startOrShowExchangeMessagesDialog(@NonNull Context context,
|
||||
|
||||
Reference in New Issue
Block a user