kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove circle from group member row.
rodzic
68e0a30c92
commit
573de99840
|
@ -87,32 +87,37 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
recipientClickListener,
|
recipientClickListener,
|
||||||
recipientLongClickListener,
|
recipientLongClickListener,
|
||||||
adminActionsListener,
|
adminActionsListener,
|
||||||
selectionChangeListener);
|
selectionChangeListener,
|
||||||
|
selectable);
|
||||||
case OWN_INVITE_PENDING:
|
case OWN_INVITE_PENDING:
|
||||||
return new OwnInvitePendingMemberViewHolder(LayoutInflater.from(parent.getContext())
|
return new OwnInvitePendingMemberViewHolder(LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.group_recipient_list_item, parent, false),
|
.inflate(R.layout.group_recipient_list_item, parent, false),
|
||||||
recipientClickListener,
|
recipientClickListener,
|
||||||
recipientLongClickListener,
|
recipientLongClickListener,
|
||||||
adminActionsListener,
|
adminActionsListener,
|
||||||
selectionChangeListener);
|
selectionChangeListener,
|
||||||
|
selectable);
|
||||||
case OTHER_INVITE_PENDING_COUNT:
|
case OTHER_INVITE_PENDING_COUNT:
|
||||||
return new UnknownPendingMemberCountViewHolder(LayoutInflater.from(parent.getContext())
|
return new UnknownPendingMemberCountViewHolder(LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.group_recipient_list_item, parent, false),
|
.inflate(R.layout.group_recipient_list_item, parent, false),
|
||||||
adminActionsListener,
|
adminActionsListener,
|
||||||
selectionChangeListener);
|
selectionChangeListener,
|
||||||
|
selectable);
|
||||||
case NEW_GROUP_CANDIDATE:
|
case NEW_GROUP_CANDIDATE:
|
||||||
return new NewGroupInviteeViewHolder(LayoutInflater.from(parent.getContext())
|
return new NewGroupInviteeViewHolder(LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.group_new_candidate_recipient_list_item, parent, false),
|
.inflate(R.layout.group_new_candidate_recipient_list_item, parent, false),
|
||||||
recipientClickListener,
|
recipientClickListener,
|
||||||
recipientLongClickListener,
|
recipientLongClickListener,
|
||||||
selectionChangeListener);
|
selectionChangeListener,
|
||||||
|
selectable);
|
||||||
case REQUESTING_MEMBER:
|
case REQUESTING_MEMBER:
|
||||||
return new RequestingMemberViewHolder(LayoutInflater.from(parent.getContext())
|
return new RequestingMemberViewHolder(LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.group_recipient_requesting_list_item, parent, false),
|
.inflate(R.layout.group_recipient_requesting_list_item, parent, false),
|
||||||
recipientClickListener,
|
recipientClickListener,
|
||||||
recipientLongClickListener,
|
recipientLongClickListener,
|
||||||
adminActionsListener,
|
adminActionsListener,
|
||||||
selectionChangeListener);
|
selectionChangeListener,
|
||||||
|
selectable);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
||||||
|
@ -181,12 +186,14 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
@Nullable final RecipientClickListener recipientClickListener;
|
@Nullable final RecipientClickListener recipientClickListener;
|
||||||
@Nullable final AdminActionsListener adminActionsListener;
|
@Nullable final AdminActionsListener adminActionsListener;
|
||||||
@Nullable final RecipientLongClickListener recipientLongClickListener;
|
@Nullable final RecipientLongClickListener recipientLongClickListener;
|
||||||
|
final boolean selectable;
|
||||||
|
|
||||||
ViewHolder(@NonNull View itemView,
|
ViewHolder(@NonNull View itemView,
|
||||||
@Nullable RecipientClickListener recipientClickListener,
|
@Nullable RecipientClickListener recipientClickListener,
|
||||||
@Nullable RecipientLongClickListener recipientLongClickListener,
|
@Nullable RecipientLongClickListener recipientLongClickListener,
|
||||||
@Nullable AdminActionsListener adminActionsListener,
|
@Nullable AdminActionsListener adminActionsListener,
|
||||||
@NonNull SelectionChangeListener selectionChangeListener)
|
@NonNull SelectionChangeListener selectionChangeListener,
|
||||||
|
boolean selectable)
|
||||||
{
|
{
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
|
@ -204,6 +211,7 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
this.recipientLongClickListener = recipientLongClickListener;
|
this.recipientLongClickListener = recipientLongClickListener;
|
||||||
this.adminActionsListener = adminActionsListener;
|
this.adminActionsListener = adminActionsListener;
|
||||||
this.selectionChangeListener = selectionChangeListener;
|
this.selectionChangeListener = selectionChangeListener;
|
||||||
|
this.selectable = selectable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bindRecipient(@NonNull Recipient recipient) {
|
void bindRecipient(@NonNull Recipient recipient) {
|
||||||
|
@ -266,6 +274,11 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
});
|
});
|
||||||
|
|
||||||
selected.setChecked(isSelected);
|
selected.setChecked(isSelected);
|
||||||
|
if (!selectable && !isSelected) {
|
||||||
|
selected.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
selected.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void hideMenu() {
|
void hideMenu() {
|
||||||
|
@ -285,9 +298,10 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
@Nullable RecipientClickListener recipientClickListener,
|
@Nullable RecipientClickListener recipientClickListener,
|
||||||
@Nullable RecipientLongClickListener recipientLongClickListener,
|
@Nullable RecipientLongClickListener recipientLongClickListener,
|
||||||
@Nullable AdminActionsListener adminActionsListener,
|
@Nullable AdminActionsListener adminActionsListener,
|
||||||
@NonNull SelectionChangeListener selectionChangeListener)
|
@NonNull SelectionChangeListener selectionChangeListener,
|
||||||
|
boolean selectable)
|
||||||
{
|
{
|
||||||
super(itemView, recipientClickListener, recipientLongClickListener, adminActionsListener, selectionChangeListener);
|
super(itemView, recipientClickListener, recipientLongClickListener, adminActionsListener, selectionChangeListener, selectable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -311,9 +325,10 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
NewGroupInviteeViewHolder(@NonNull View itemView,
|
NewGroupInviteeViewHolder(@NonNull View itemView,
|
||||||
@Nullable RecipientClickListener recipientClickListener,
|
@Nullable RecipientClickListener recipientClickListener,
|
||||||
@Nullable RecipientLongClickListener recipientLongClickListener,
|
@Nullable RecipientLongClickListener recipientLongClickListener,
|
||||||
@NonNull SelectionChangeListener selectionChangeListener)
|
@NonNull SelectionChangeListener selectionChangeListener,
|
||||||
|
boolean selectable)
|
||||||
{
|
{
|
||||||
super(itemView, recipientClickListener, recipientLongClickListener, null, selectionChangeListener);
|
super(itemView, recipientClickListener, recipientLongClickListener, null, selectionChangeListener, selectable);
|
||||||
|
|
||||||
smsContact = itemView.findViewById(R.id.sms_contact);
|
smsContact = itemView.findViewById(R.id.sms_contact);
|
||||||
smsWarning = itemView.findViewById(R.id.sms_warning);
|
smsWarning = itemView.findViewById(R.id.sms_warning);
|
||||||
|
@ -339,9 +354,10 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
@Nullable RecipientClickListener recipientClickListener,
|
@Nullable RecipientClickListener recipientClickListener,
|
||||||
@Nullable RecipientLongClickListener recipientLongClickListener,
|
@Nullable RecipientLongClickListener recipientLongClickListener,
|
||||||
@Nullable AdminActionsListener adminActionsListener,
|
@Nullable AdminActionsListener adminActionsListener,
|
||||||
@NonNull SelectionChangeListener selectionChangeListener)
|
@NonNull SelectionChangeListener selectionChangeListener,
|
||||||
|
boolean selectable)
|
||||||
{
|
{
|
||||||
super(itemView, recipientClickListener, recipientLongClickListener, adminActionsListener, selectionChangeListener);
|
super(itemView, recipientClickListener, recipientLongClickListener, adminActionsListener, selectionChangeListener, selectable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -371,9 +387,10 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
|
|
||||||
UnknownPendingMemberCountViewHolder(@NonNull View itemView,
|
UnknownPendingMemberCountViewHolder(@NonNull View itemView,
|
||||||
@Nullable AdminActionsListener adminActionsListener,
|
@Nullable AdminActionsListener adminActionsListener,
|
||||||
@NonNull SelectionChangeListener selectionChangeListener)
|
@NonNull SelectionChangeListener selectionChangeListener,
|
||||||
|
boolean selectable)
|
||||||
{
|
{
|
||||||
super(itemView, null, null, adminActionsListener, selectionChangeListener);
|
super(itemView, null, null, adminActionsListener, selectionChangeListener, selectable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -420,9 +437,10 @@ final class GroupMemberListAdapter extends LifecycleRecyclerAdapter<GroupMemberL
|
||||||
@Nullable RecipientClickListener recipientClickListener,
|
@Nullable RecipientClickListener recipientClickListener,
|
||||||
@Nullable RecipientLongClickListener recipientLongClickListener,
|
@Nullable RecipientLongClickListener recipientLongClickListener,
|
||||||
@Nullable AdminActionsListener adminActionsListener,
|
@Nullable AdminActionsListener adminActionsListener,
|
||||||
@NonNull SelectionChangeListener selectionChangeListener)
|
@NonNull SelectionChangeListener selectionChangeListener,
|
||||||
|
boolean selectable)
|
||||||
{
|
{
|
||||||
super(itemView, recipientClickListener, recipientLongClickListener, adminActionsListener, selectionChangeListener);
|
super(itemView, recipientClickListener, recipientLongClickListener, adminActionsListener, selectionChangeListener, selectable);
|
||||||
|
|
||||||
approveRequest = itemView.findViewById(R.id.request_approve);
|
approveRequest = itemView.findViewById(R.id.request_approve);
|
||||||
denyRequest = itemView.findViewById(R.id.request_deny);
|
denyRequest = itemView.findViewById(R.id.request_deny);
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
android:button="@null"
|
android:button="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/recipient_avatar"
|
app:layout_constraintBottom_toBottomOf="@+id/recipient_avatar"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/recipient_avatar"
|
app:layout_constraintEnd_toEndOf="@+id/recipient_avatar"
|
||||||
tools:checked="true" />
|
tools:checked="true" />
|
||||||
|
@ -89,12 +90,12 @@
|
||||||
android:textAppearance="@style/TextAppearance.Signal.Body2"
|
android:textAppearance="@style/TextAppearance.Signal.Body2"
|
||||||
android:textColor="@color/signal_text_secondary"
|
android:textColor="@color/signal_text_secondary"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_goneMarginEnd="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/popupMenuProgressContainer"
|
app:layout_constraintEnd_toStartOf="@+id/popupMenuProgressContainer"
|
||||||
app:layout_constraintHorizontal_bias="0"
|
app:layout_constraintHorizontal_bias="0"
|
||||||
app:layout_constraintStart_toEndOf="@+id/recipient_name"
|
app:layout_constraintStart_toEndOf="@+id/recipient_name"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_goneMarginEnd="0dp"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|
Ładowanie…
Reference in New Issue