From 968b04a508405d2e450bc319b49fcb3e5a3351ba Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Mon, 14 Nov 2022 15:17:55 +1100 Subject: Send correct image index when opening the image in gallery posts. --- .../adapters/PostRecyclerViewAdapter.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 182204e5..c39560fa 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -3271,12 +3271,11 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter= 0) { if (post != null) { markPostRead(post, true); - openMedia(post, index); + openMedia(post, layoutManager.findFirstVisibleItemPosition()); } } } @@ -4278,7 +4277,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter