fix selection mode for reposts on Publishes page
This commit is contained in:
parent
e6861c8436
commit
a40c160ac6
2 changed files with 3 additions and 2 deletions
|
@ -327,7 +327,7 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
|
|||
}
|
||||
|
||||
boolean isPending = item.getConfirmations() == 0;
|
||||
boolean isSelected = isClaimSelected(item);
|
||||
boolean isSelected = isClaimSelected(original);
|
||||
vh.itemView.setSelected(isSelected);
|
||||
vh.selectedOverlayView.setVisibility(isSelected ? View.VISIBLE : View.GONE);
|
||||
vh.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
|
@ -239,7 +239,8 @@ public class PublishesFragment extends BaseFragment implements ActionMode.Callba
|
|||
@Override
|
||||
public boolean onPrepareActionMode(androidx.appcompat.view.ActionMode actionMode, Menu menu) {
|
||||
int selectionCount = adapter != null ? adapter.getSelectedCount() : 0;
|
||||
menu.findItem(R.id.action_edit).setVisible(selectionCount == 1);
|
||||
menu.findItem(R.id.action_edit).setVisible(selectionCount == 1 &&
|
||||
Claim.TYPE_STREAM.equalsIgnoreCase(adapter.getSelectedItems().get(0).getValueType()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue