Skip to content

Commit

Permalink
For albums with only one image, the image is now shown immediately (f…
Browse files Browse the repository at this point in the history
…ixes #381)
  • Loading branch information
QuantumBadger committed Sep 1, 2016
1 parent 2a99476 commit 3cb49cd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions assets/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Ability to view custom user pages
Preference to use un-shortened link for "Share Comments" (thanks to fhtagn)
Preference for cache storage location (thanks to ShadowNinja)
Preference to set pinned subreddit sort order (thanks to chippen)
For albums with only one image, the image is now shown immediately

73/1.9.5.1
Comment swipe actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,20 @@ public void run() {

layout.removeAllViews();

final ScrollbarRecyclerViewManager recyclerViewManager
= new ScrollbarRecyclerViewManager(AlbumListingActivity.this, null, false);
if(info.images.size() == 1) {
LinkHandler.onLinkClicked(AlbumListingActivity.this, info.images.get(0).urlOriginal);
finish();

layout.addView(recyclerViewManager.getOuterView());
} else {
final ScrollbarRecyclerViewManager recyclerViewManager
= new ScrollbarRecyclerViewManager(AlbumListingActivity.this, null, false);

recyclerViewManager.getRecyclerView().setAdapter(new AlbumAdapter(AlbumListingActivity.this, info));
layout.addView(recyclerViewManager.getOuterView());

recyclerViewManager.getRecyclerView().setAdapter(new AlbumAdapter(
AlbumListingActivity.this,
info));
}
}
});
}
Expand Down

0 comments on commit 3cb49cd

Please sign in to comment.