diff options
author | Sergei Kozelko <KozelkoS@yandex.ru> | 2022-11-08 05:53:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-08 05:53:39 +0000 |
commit | 2c9ffbc6142f63b72a1b53f24d2100d9d0d63751 (patch) | |
tree | a6ee6258505fef306dbc7fb309e05c38ac8bb3c8 /app/src | |
parent | c2360ca59a0edc729815448461b48c564920f21b (diff) | |
download | infinity-for-reddit-2c9ffbc6142f63b72a1b53f24d2100d9d0d63751.tar infinity-for-reddit-2c9ffbc6142f63b72a1b53f24d2100d9d0d63751.tar.gz infinity-for-reddit-2c9ffbc6142f63b72a1b53f24d2100d9d0d63751.tar.bz2 infinity-for-reddit-2c9ffbc6142f63b72a1b53f24d2100d9d0d63751.tar.lz infinity-for-reddit-2c9ffbc6142f63b72a1b53f24d2100d9d0d63751.tar.xz infinity-for-reddit-2c9ffbc6142f63b72a1b53f24d2100d9d0d63751.tar.zst infinity-for-reddit-2c9ffbc6142f63b72a1b53f24d2100d9d0d63751.zip |
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.
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java index e28a579a..1dc57835 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -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); |