Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 904c80dd authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #1555 from k9mail/alternate-recip-fix

Small fix for alternate recipient adapter
parents 5feed620 a2674eff
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -49,6 +49,10 @@ public class AlternateRecipientAdapter extends BaseAdapter {

    public void setAlternateRecipientInfo(List<Recipient> recipients) {
        this.recipients = recipients;
        int indexOfCurrentRecipient = recipients.indexOf(currentRecipient);
        if (indexOfCurrentRecipient >= 0) {
            currentRecipient = recipients.get(indexOfCurrentRecipient);
        }
        recipients.remove(currentRecipient);
        notifyDataSetChanged();
    }
+2 −3
Original line number Diff line number Diff line
@@ -334,8 +334,7 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem
                if (contactLookupUri != null) {
                    return new RecipientLoader(getContext(), cryptoProvider, contactLookupUri, true);
                } else {
                    String address = alternatesPopupRecipient.address.getAddress();
                    return new RecipientLoader(getContext(), cryptoProvider, address);
                    return new RecipientLoader(getContext(), cryptoProvider, alternatesPopupRecipient.address);
                }
            }
        }
@@ -451,7 +450,7 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem

        RecipientTokenSpan[] recipientSpans = text.getSpans(0, text.length(), RecipientTokenSpan.class);
        for (RecipientTokenSpan recipientSpan : recipientSpans) {
            if (recipientSpan.getToken() == currentRecipient) {
            if (recipientSpan.getToken().equals(currentRecipient)) {
                return recipientSpan.view;
            }
        }