show transfer progress when re-sending failed media

Closes #4341
fixes #4104
// FREEBIE
This commit is contained in:
Jake McGinty 2015-11-02 13:55:16 -08:00 committed by Moxie Marlinspike
parent cad8ff766a
commit 3fa11d9931

View File

@ -97,6 +97,12 @@ public class ThumbnailView extends FrameLayout {
} }
public void setImageResource(@NonNull MasterSecret masterSecret, @NonNull Slide slide, boolean showControls) { 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)) { if (Util.equals(slide, this.slide)) {
Log.w(TAG, "Not re-loading slide " + slide.asAttachment().getDataUri()); Log.w(TAG, "Not re-loading slide " + slide.asAttachment().getDataUri());
@ -108,13 +114,6 @@ public class ThumbnailView extends FrameLayout {
return; 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() Log.w(TAG, "loading part with id " + slide.asAttachment().getDataUri()
+ ", progress " + slide.getTransferState()); + ", progress " + slide.getTransferState());