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

expose download status of messages. slightly grey out messages that haven't yet been downloaded fully

This commit is contained in:
Jesse Vincent 2009-05-05 04:51:11 +00:00
parent 7cdac9e721
commit 1d7fdbeb92

View File

@ -2222,6 +2222,16 @@ public class FolderMessageList extends ExpandableListActivity
holder.subject.setTextColor(0xff000000); holder.subject.setTextColor(0xff000000);
} }
if (! message.partially_downloaded && !message.downloaded ) {
holder.chip.getBackground().setAlpha(127);
holder.subject.setTextColor(0x60000000);
holder.date.setTextColor(0x60000000);
holder.from.setTextColor(0x60000000);
} else {
holder.date.setTextColor(0xff000000);
holder.from.setTextColor(0xff000000);
}
holder.subject.setText(message.subject); holder.subject.setText(message.subject);
holder.from.setText(message.sender); holder.from.setText(message.sender);
@ -2329,6 +2339,10 @@ public class FolderMessageList extends ExpandableListActivity
public boolean flagged; public boolean flagged;
public boolean downloaded;
public boolean partially_downloaded;
public Message message; public Message message;
public FolderInfoHolder folder; public FolderInfoHolder folder;
@ -2357,6 +2371,8 @@ public class FolderMessageList extends ExpandableListActivity
this.read = message.isSet(Flag.SEEN); this.read = message.isSet(Flag.SEEN);
this.answered = message.isSet(Flag.ANSWERED); this.answered = message.isSet(Flag.ANSWERED);
this.flagged = message.isSet(Flag.FLAGGED); this.flagged = message.isSet(Flag.FLAGGED);
this.downloaded = message.isSet(Flag.X_DOWNLOADED_FULL);
this.partially_downloaded = message.isSet(Flag.X_DOWNLOADED_PARTIAL);
Address[] addrs = message.getFrom(); Address[] addrs = message.getFrom();
if (addrs.length > 0 && mAccount.isAnIdentity(addrs[0])) if (addrs.length > 0 && mAccount.isAnIdentity(addrs[0]))