messageview: move setShowDownloadButton into setMessage

This commit is contained in:
Vincent Breitmoser 2016-06-06 18:24:43 +02:00
parent f6f4805076
commit b5b603001b
2 changed files with 3 additions and 2 deletions

View file

@ -112,6 +112,8 @@ public class MessageTopView extends LinearLayout implements ShowPicturesControll
public void setMessage(Account account, MessageViewInfo messageViewInfo) throws MessagingException {
resetView();
setShowDownloadButton(messageViewInfo.message);
MessageCryptoDisplayStatus displayStatus =
MessageCryptoDisplayStatus.fromResultAnnotation(messageViewInfo.cryptoResultAnnotation);
mHeaderContainer.setCryptoStatus(displayStatus);
@ -278,7 +280,7 @@ public class MessageTopView extends LinearLayout implements ShowPicturesControll
mDownloadRemainder.setEnabled(false);
}
public void setShowDownloadButton(Message message) {
private void setShowDownloadButton(Message message) {
if (message.isSet(Flag.X_DOWNLOADED_FULL)) {
mDownloadRemainder.setVisibility(View.GONE);
} else {

View file

@ -238,7 +238,6 @@ public class MessageViewFragment extends Fragment implements ConfirmationDialogF
messageCryptoPresenter.setMessageViewInfo(messageViewInfo);
try {
mMessageView.setMessage(mAccount, messageViewInfo);
mMessageView.setShowDownloadButton(mMessage);
} catch (MessagingException e) {
Log.e(K9.LOG_TAG, "Error while trying to display message", e);
}