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
1 changed files with 8 additions and 4 deletions

View File

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