ContentElement e = getElement(c);
if (e == null) {
return;
}
ImageThumbnailView v = renderer.getView(e);
switch (c.getUploadStatusCode()) {
case NOT_UPLOADING:
case SUCCEEDED:
v.hideUploadProgress();
break;
case IN_PROGRESS:
case FAILED_AND_RETRYABLE:
v.setUploadProgress(c.getUploadStatusProgress());
v.showUploadProgress();
break;
case FAILED_AND_NOT_RETRYABLE:
v.hideUploadProgress();
v.displayDeadImage(attachmentLoadingFailedTooltip);
break;
default:
throw new IllegalStateException();
}
}