mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-17 07:30:16 -05:00
Should change Bcc address when Identity changed.
This commit is contained in:
parent
1abc8619b1
commit
c0cb734288
@ -734,13 +734,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
}
|
||||
|
||||
if (mAction != Action.EDIT_DRAFT) {
|
||||
String bccAddress = mAccount.getAlwaysBcc();
|
||||
if ((bccAddress != null) && !("".equals(bccAddress))) {
|
||||
String[] bccAddresses = bccAddress.split(",");
|
||||
for (String oneBccAddress : bccAddresses) {
|
||||
addAddress(mBccView, new Address(oneBccAddress, ""));
|
||||
}
|
||||
}
|
||||
addAddresses(mBccView, mAccount.getAlwaysBcc());
|
||||
}
|
||||
|
||||
updateTitle();
|
||||
@ -1132,6 +1126,15 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
}
|
||||
}
|
||||
|
||||
private void addAddresses(MultiAutoCompleteTextView view, String addresses) {
|
||||
if (StringUtils.isNullOrEmpty(addresses)) {
|
||||
return;
|
||||
}
|
||||
for (String address : addresses.split(",")) {
|
||||
addAddress(view, new Address(address, ""));
|
||||
}
|
||||
}
|
||||
|
||||
private void addAddresses(MultiAutoCompleteTextView view, Address[] addresses) {
|
||||
if (addresses == null) {
|
||||
return;
|
||||
@ -2067,6 +2070,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
mIdentityChanged = true;
|
||||
mDraftNeedsSaving = true;
|
||||
updateFrom();
|
||||
updateBcc();
|
||||
updateSignature();
|
||||
updateMessageFormat();
|
||||
}
|
||||
@ -2075,6 +2079,14 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
mChooseIdentityButton.setText(mIdentity.getEmail());
|
||||
}
|
||||
|
||||
private void updateBcc() {
|
||||
if (mIdentityChanged) {
|
||||
mBccWrapper.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mBccView.setText("");
|
||||
addAddresses(mBccView, mAccount.getAlwaysBcc());
|
||||
}
|
||||
|
||||
private void updateSignature() {
|
||||
if (mIdentity.getSignatureUse()) {
|
||||
mSignatureView.setText(mIdentity.getSignature());
|
||||
|
Loading…
Reference in New Issue
Block a user