Large attachment support

Closes #4019
// FREEBIE
This commit is contained in:
Jake McGinty
2015-09-04 17:33:22 -07:00
committed by Moxie Marlinspike
parent 4f7ac59c6f
commit 551274f167
14 changed files with 209 additions and 246 deletions

View File

@@ -201,7 +201,12 @@ public class ThumbnailView extends FrameLayout {
}
public void clear() {
if (isContextValid()) Glide.clear(this);
if (isContextValid()) Glide.clear(image);
if (slideDeckFuture != null) slideDeckFuture.removeListener(slideDeckListener);
slide = null;
slideId = null;
slideDeckFuture = null;
slideDeckListener = null;
}
public void hideControls(boolean hideControls) {
@@ -209,6 +214,11 @@ public class ThumbnailView extends FrameLayout {
if (hideControls) hideProgressWheel();
}
public void showProgressSpinner() {
getProgressWheel().spin();
getProgressWheel().setVisibility(VISIBLE);
}
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1)
private boolean isContextValid() {
return !(getContext() instanceof Activity) ||