From 3fa11d993158281de49b244ef73b198887dfc2c0 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Mon, 2 Nov 2015 13:55:16 -0800 Subject: [PATCH] show transfer progress when re-sending failed media Closes #4341 fixes #4104 // FREEBIE --- .../securesms/components/ThumbnailView.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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());