1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

refactor display of the download button

This commit is contained in:
Jesse Vincent 2011-02-11 12:11:21 -05:00
parent 9deea33426
commit abc921093c
2 changed files with 5 additions and 1 deletions

View File

@ -1185,7 +1185,7 @@ public class MessageView extends K9Activity implements OnClickListener {
@Override
public void loadMessageForViewFinished(Account account, String folder, String uid,
Message message) {
final Message message) {
if (!mMessageReference.uid.equals(uid) || !mMessageReference.folderName.equals(folder)
|| !mMessageReference.accountUuid.equals(account.getUuid())) {
return;
@ -1193,6 +1193,7 @@ public class MessageView extends K9Activity implements OnClickListener {
mHandler.post(new Runnable() {
public void run() {
setProgressBarIndeterminateVisibility(false);
mMessageView.setShowDownloadButton(message);
}
});
}

View File

@ -96,6 +96,9 @@ public class SingleMessageView extends LinearLayout {
} catch (Exception me) {
Log.e(K9.LOG_TAG, "setHeaders - error", me);
}
}
public void setShowDownloadButton(Message message) {
if (message.isSet(Flag.X_DOWNLOADED_FULL)) {
mDownloadRemainder.setVisibility(View.GONE);
} else {