mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 02:50:56 +01:00
Use/check recycler view adapter position
This commit is contained in:
@@ -82,7 +82,10 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
final TupleAttachment attachment = filtered.get(getLayoutPosition());
|
||||
int pos = getAdapterPosition();
|
||||
if (pos == RecyclerView.NO_POSITION)
|
||||
return;
|
||||
final TupleAttachment attachment = filtered.get(pos);
|
||||
if (attachment != null)
|
||||
if (attachment.content) {
|
||||
// Build file name
|
||||
|
||||
Reference in New Issue
Block a user