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(
|
||||||
clickPref(
|
title = DSLSettingsText.from(R.string.ConversationSettingsFragment__view_safety_number),
|
||||||
title = DSLSettingsText.from(R.string.ConversationSettingsFragment__view_safety_number),
|
icon = DSLSettingsIcon.from(R.drawable.ic_safety_number_24),
|
||||||
icon = DSLSettingsIcon.from(R.drawable.ic_safety_number_24),
|
isEnabled = !state.isDeprecatedOrUnregistered,
|
||||||
isEnabled = !state.isDeprecatedOrUnregistered,
|
onClick = {
|
||||||
onClick = {
|
VerifyIdentityActivity.startOrShowExchangeMessagesDialog(requireActivity(), recipientState.identityRecord)
|
||||||
VerifyIdentityActivity.startOrShowExchangeMessagesDialog(requireActivity(), recipientState.identityRecord)
|
}
|
||||||
}
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.sharedMedia != null && state.sharedMedia.count > 0) {
|
if (state.sharedMedia != null && state.sharedMedia.count > 0) {
|
||||||
|
|||||||
@@ -314,14 +314,11 @@ public final class RecipientBottomSheetDialogFragment extends BottomSheetDialogF
|
|||||||
});
|
});
|
||||||
|
|
||||||
viewModel.getIdentity().observe(getViewLifecycleOwner(), identityRecord -> {
|
viewModel.getIdentity().observe(getViewLifecycleOwner(), identityRecord -> {
|
||||||
viewSafetyNumberButton.setVisibility(identityRecord != null ? View.VISIBLE : View.GONE);
|
viewSafetyNumberButton.setVisibility(View.VISIBLE);
|
||||||
|
viewSafetyNumberButton.setOnClickListener(view -> {
|
||||||
if (identityRecord != null) {
|
dismiss();
|
||||||
viewSafetyNumberButton.setOnClickListener(view -> {
|
viewModel.onViewSafetyNumberClicked(requireActivity(), identityRecord);
|
||||||
dismiss();
|
});
|
||||||
viewModel.onViewSafetyNumberClicked(requireActivity(), identityRecord);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
avatar.setOnClickListener(view -> {
|
avatar.setOnClickListener(view -> {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
@@ -35,8 +36,12 @@ public class VerifyIdentityActivity extends PassphraseRequiredActivity {
|
|||||||
private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme();
|
private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme();
|
||||||
|
|
||||||
public static void startOrShowExchangeMessagesDialog(@NonNull Context context,
|
public static void startOrShowExchangeMessagesDialog(@NonNull Context context,
|
||||||
@NonNull IdentityRecord identityRecord) {
|
@Nullable IdentityRecord identityRecord) {
|
||||||
startOrShowExchangeMessagesDialog(context, identityRecord.getRecipientId(), identityRecord.getIdentityKey(), identityRecord.getVerifiedStatus() == IdentityTable.VerifiedStatus.VERIFIED);
|
if (identityRecord != null) {
|
||||||
|
startOrShowExchangeMessagesDialog(context, identityRecord.getRecipientId(), identityRecord.getIdentityKey(), identityRecord.getVerifiedStatus() == IdentityTable.VerifiedStatus.VERIFIED);
|
||||||
|
} else {
|
||||||
|
showExchangeMessagesDialog(context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void startOrShowExchangeMessagesDialog(@NonNull Context context,
|
public static void startOrShowExchangeMessagesDialog(@NonNull Context context,
|
||||||
|
|||||||
Reference in New Issue
Block a user