diff --git a/src/org/thoughtcrime/securesms/components/ThumbnailView.java b/src/org/thoughtcrime/securesms/components/ThumbnailView.java index 8847da76f5..b9a412c7c5 100644 --- a/src/org/thoughtcrime/securesms/components/ThumbnailView.java +++ b/src/org/thoughtcrime/securesms/components/ThumbnailView.java @@ -97,6 +97,12 @@ public class ThumbnailView extends FrameLayout { } public void setImageResource(@NonNull MasterSecret masterSecret, @NonNull Slide slide, boolean showControls) { + if (showControls) { + getTransferControls().setSlide(slide); + getTransferControls().setDownloadClickListener(new DownloadClickDispatcher()); + } else if (transferControls.isPresent()) { + getTransferControls().setVisibility(View.GONE); + } if (Util.equals(slide, this.slide)) { Log.w(TAG, "Not re-loading slide " + slide.asAttachment().getDataUri()); @@ -108,13 +114,6 @@ public class ThumbnailView extends FrameLayout { return; } - if (showControls) { - getTransferControls().setSlide(slide); - getTransferControls().setDownloadClickListener(new DownloadClickDispatcher()); - } else if (transferControls.isPresent()) { - getTransferControls().setVisibility(View.GONE); - } - Log.w(TAG, "loading part with id " + slide.asAttachment().getDataUri() + ", progress " + slide.getTransferState());