Fixed error when responding to messages with a very short subject

This commit is contained in:
Christian Basler 2016-02-06 13:24:25 +01:00
parent d682df4cdb
commit a3c3fc082d

View File

@ -157,10 +157,14 @@ public class MessageDetailFragment extends Fragment {
ComposeMessageActivity.class); ComposeMessageActivity.class);
replyIntent.putExtra(EXTRA_RECIPIENT, item.getFrom()); replyIntent.putExtra(EXTRA_RECIPIENT, item.getFrom());
replyIntent.putExtra(EXTRA_IDENTITY, item.getTo()); replyIntent.putExtra(EXTRA_IDENTITY, item.getTo());
replyIntent.putExtra(EXTRA_SUBJECT, String prefix;
(item.getSubject().substring(0, 3).equalsIgnoreCase("RE:") ? "" : "RE: ") if (item.getSubject().length() >= 3 && item.getSubject().substring(0, 3)
+ item.getSubject() .equalsIgnoreCase("RE:")) {
); prefix = "";
} else {
prefix = "RE: ";
}
replyIntent.putExtra(EXTRA_SUBJECT, prefix + item.getSubject());
startActivity(replyIntent); startActivity(replyIntent);
return true; return true;
case R.id.delete: case R.id.delete: