mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-27 19:38:22 +01:00
Fix getting comment for "continue thread" button (#1207)
It used position of viewholder during binding which could get outdated by the time user clicks on the button. This would result in retrieving wrong comment or even null. Replaced with getting comment based on current position of vieholder.
This commit is contained in:
parent
c2360ca59a
commit
2c9ffbc614
@ -780,7 +780,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
});
|
||||
} else {
|
||||
((LoadMoreChildCommentsViewHolder) holder).placeholderTextView.setOnClickListener(view -> {
|
||||
Comment comment = getCurrentComment(position);
|
||||
Comment comment = getCurrentComment(holder);
|
||||
if (comment != null) {
|
||||
Intent intent = new Intent(mActivity, ViewPostDetailActivity.class);
|
||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_DATA, mPost);
|
||||
|
Loading…
Reference in New Issue
Block a user