Delete button on RecyclerView deletes the wrong item

前端 未结 2 1222
遥遥无期
遥遥无期 2021-01-28 10:27

I am using Firestore adapter for my RecyclerView and I am having trouble with the \'Delete\' button. When I press it, it deletes the wrong item instead of the one t

2条回答
  •  庸人自扰
    2021-01-28 11:25

    You are sending wrong data.

    Query query = collectionReference.whereEqualTo("donationReq", (position + 1));
    

    You had write position instead of position + 1

提交回复
热议问题