Fixed save draft on edit

pull/168/head
M66B 5 years ago
parent 356bfa01fc
commit 151101ebc0

@ -412,8 +412,12 @@ public class FragmentCompose extends FragmentBase {
cbSignature.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { cbSignature.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
Object tag = cbSignature.getTag();
if (tag == null || !tag.equals(checked)) {
cbSignature.setTag(checked);
onAction(R.id.action_save); onAction(R.id.action_save);
} }
}
}); });
ibCloseRefHint.setOnClickListener(new View.OnClickListener() { ibCloseRefHint.setOnClickListener(new View.OnClickListener() {
@ -2639,6 +2643,7 @@ public class FragmentCompose extends FragmentBase {
long reference = args.getLong("reference", -1); long reference = args.getLong("reference", -1);
etTo.setTag(reference < 0 ? "" : etTo.getText().toString()); etTo.setTag(reference < 0 ? "" : etTo.getText().toString());
etSubject.setTag(reference < 0 ? "" : etSubject.getText().toString()); etSubject.setTag(reference < 0 ? "" : etSubject.getText().toString());
cbSignature.setTag(data.draft.signature);
grpHeader.setVisibility(View.VISIBLE); grpHeader.setVisibility(View.VISIBLE);
grpAddresses.setVisibility("reply_all".equals(action) ? View.VISIBLE : View.GONE); grpAddresses.setVisibility("reply_all".equals(action) ? View.VISIBLE : View.GONE);

Loading…
Cancel
Save