Do not show Buttons for Message, Video, Audio/Call in RecipientBottomSheetDialog when recipient is blocked.

fork-5.53.8
Sgn-32 2022-01-29 17:03:06 +01:00 zatwierdzone przez Cody Henthorne
rodzic 9569b6ab4a
commit befb720eda
1 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -211,13 +211,13 @@ public final class RecipientBottomSheetDialogFragment extends BottomSheetDialogF
}
ButtonStripPreference.State buttonStripState = new ButtonStripPreference.State(
/* isMessageAvailable = */ !recipient.isSelf(),
/* isVideoAvailable = */ recipient.isRegistered() && !recipient.isSelf(),
/* isAudioAvailable = */ !recipient.isSelf(),
/* isMuteAvailable = */ false,
/* isSearchAvailable = */ false,
/* isAudioSecure = */ recipient.isRegistered(),
/* isMuted = */ false
/* isMessageAvailable = */ !recipient.isBlocked() && !recipient.isSelf(),
/* isVideoAvailable = */ !recipient.isBlocked() && !recipient.isSelf() && recipient.isRegistered(),
/* isAudioAvailable = */ !recipient.isBlocked() && !recipient.isSelf(),
/* isMuteAvailable = */ false,
/* isSearchAvailable = */ false,
/* isAudioSecure = */ recipient.isRegistered(),
/* isMuted = */ false
);
ButtonStripPreference.Model buttonStripModel = new ButtonStripPreference.Model(
@ -246,7 +246,7 @@ public final class RecipientBottomSheetDialogFragment extends BottomSheetDialogF
new ButtonStripPreference.ViewHolder(buttonStrip).bind(buttonStripModel);
if (recipient.isSystemContact() || recipient.isGroup() || recipient.isSelf()) {
if (recipient.isSystemContact() || recipient.isGroup() || recipient.isSelf() || recipient.isBlocked()) {
addContactButton.setVisibility(View.GONE);
} else {
addContactButton.setVisibility(View.VISIBLE);