Skip to content

Commit

Permalink
When "post title opens comments" is enabled, the thumbnail now opens …
Browse files Browse the repository at this point in the history
…the post rather than the comments
  • Loading branch information
QuantumBadger committed Dec 17, 2023
1 parent 8a8da55 commit 1ebd877
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/main/assets/changelog-alpha.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/Alpha 345 (2023-12-17)
When "post title opens comments" is enabled, the thumbnail now opens the post rather than the comments

/Alpha 344 (2023-12-16)
Significantly improved image gallery load speed
Added help page for people having trouble logging in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,13 @@ public void handleMessage(@NonNull final Message msg) {

final boolean postTitleOpensPost = PrefsUtility.pref_behaviour_post_title_opens_comments();

mThumbnailView = Objects.requireNonNull(
rootView.findViewById(R.id.reddit_post_thumbnail_view));

if(postTitleOpensPost) {
mOuterView.setOnClickListener(v -> fragmentParent.onPostCommentsSelected(mPost));
mThumbnailView.setOnClickListener(v -> fragmentParent.onPostSelected(mPost));

} else {
mOuterView.setOnClickListener(v -> fragmentParent.onPostSelected(mPost));
}
Expand All @@ -249,9 +254,6 @@ public void handleMessage(@NonNull final Message msg) {
return true;
});

mThumbnailView = Objects.requireNonNull(
rootView.findViewById(R.id.reddit_post_thumbnail_view));

mOverlayIcon = Objects.requireNonNull(
rootView.findViewById(R.id.reddit_post_overlay_icon));

Expand Down

0 comments on commit 1ebd877

Please sign in to comment.