messageview: move setShowDownloadButton into setMessage
This commit is contained in:
parent
f6f4805076
commit
b5b603001b
2 changed files with 3 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue