Pass MailTo instance to RecipientPresenter

This commit is contained in:
cketti 2016-01-13 10:48:10 +01:00
parent 042346301f
commit 68fc9a9555
2 changed files with 6 additions and 14 deletions

View file

@ -2801,14 +2801,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
* The MailTo object we use to initialize message field
*/
private void initializeFromMailto(MailTo mailTo) {
Address[] toList = mailTo.getTo();
Address[] ccList = mailTo.getCc();
Address[] bccList = mailTo.getBcc();
recipientPresenter.initFromMailto(toList, ccList, bccList);
recipientPresenter.initFromMailto(mailTo);
String subject = mailTo.getSubject();
if (subject != null && !subject.isEmpty()) {

View file

@ -19,6 +19,7 @@ import com.fsck.k9.Identity;
import com.fsck.k9.R;
import com.fsck.k9.activity.RecipientMvpView.CryptoStatusType;
import com.fsck.k9.helper.Contacts;
import com.fsck.k9.helper.MailTo;
import com.fsck.k9.helper.Utility;
import com.fsck.k9.mail.Address;
import com.fsck.k9.mail.Message;
@ -157,12 +158,10 @@ public class RecipientPresenter {
}
}
public void initFromMailto(Address[] toList, Address[] ccList, Address[] bccList) {
addToAddresses(toList);
addCcAddresses(ccList);
addBccAddresses(bccList);
public void initFromMailto(MailTo mailTo) {
addToAddresses(mailTo.getTo());
addCcAddresses(mailTo.getCc());
addBccAddresses(mailTo.getBcc());
}
public void initFromSendOrViewIntent(Intent intent) {