Show recipient for emails listed in Outbox and Sent

This commit is contained in:
str4d
2014-08-27 05:27:03 +00:00
parent 0338247cda
commit 5e93be9cbc
3 changed files with 12 additions and 9 deletions

1
TODO
View File

@@ -1,6 +1,5 @@
Fixes:
- Auto-comma the To: field when it loses focus
- Show recipient for emails listed in Outbox and Sent
- Ask to login when opening "Create new identity"
- Fix tick over selected emails
- Refine view email page

View File

@@ -55,7 +55,7 @@ public class EmailListAdapter extends ArrayAdapter<Email> {
ImageView picture = (ImageView) v.findViewById(R.id.contact_picture);
TextView subject = (TextView) v.findViewById(R.id.email_subject);
TextView from = (TextView) v.findViewById(R.id.email_from);
TextView address = (TextView) v.findViewById(R.id.email_address);
TextView content = (TextView) v.findViewById(R.id.email_content);
TextView sent = (TextView) v.findViewById(R.id.email_sent);
@@ -72,14 +72,18 @@ public class EmailListAdapter extends ArrayAdapter<Email> {
//}
try {
String fromAddress = email.getOneFromAddress();
String otherAddress;
if (BoteHelper.isSentEmail(email))
otherAddress = email.getOneRecipient();
else
otherAddress = email.getOneFromAddress();
Bitmap pic = BoteHelper.getPictureForAddress(fromAddress);
Bitmap pic = BoteHelper.getPictureForAddress(otherAddress);
if (pic != null)
picture.setImageBitmap(pic);
subject.setText(email.getSubject());
from.setText(BoteHelper.getNameAndShortDestination(fromAddress));
address.setText(BoteHelper.getNameAndShortDestination(otherAddress));
if (email.getSentDate() != null)
sent.setText(DateFormat.getInstance().format(
email.getSentDate()));
@@ -95,7 +99,7 @@ public class EmailListAdapter extends ArrayAdapter<Email> {
if (email.isUnread()) {
subject.setTypeface(Typeface.DEFAULT_BOLD);
from.setTypeface(Typeface.DEFAULT_BOLD);
address.setTypeface(Typeface.DEFAULT_BOLD);
}
TextView emailStatus = (TextView) v.findViewById(R.id.email_status);

View File

@@ -38,7 +38,7 @@
android:id="@+id/email_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/email_from"
android:layout_alignLeft="@+id/email_address"
android:layout_below="@+id/email_subject"
android:layout_toStartOf="@+id/email_status"
android:ellipsize="end"
@@ -46,7 +46,7 @@
android:text="Content" />
<TextView
android:id="@+id/email_from"
android:id="@+id/email_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/email_subject"
@@ -81,7 +81,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/email_from"
android:layout_alignTop="@+id/email_address"
android:text="##:## XX"
android:textAppearance="?android:attr/textAppearanceSmall" />