mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-02 00:25:10 -04:00
Simplied code and added curly brackets to if/else
This commit is contained in:
parent
1a01c10fc5
commit
773d1e30f1
@ -1531,8 +1531,9 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
|
||||
mDraftNeedsSaving = false;
|
||||
|
||||
if (!draftsDisabled())
|
||||
if (!draftsDisabled()) {
|
||||
saveMessage();
|
||||
}
|
||||
}
|
||||
|
||||
public void onEncryptionKeySelectionDone() {
|
||||
@ -2012,8 +2013,9 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
getMenuInflater().inflate(R.menu.message_compose_option, menu);
|
||||
|
||||
// Disable the 'Save' menu option if folder is set to NONE
|
||||
if (draftsDisabled())
|
||||
if (draftsDisabled()) {
|
||||
menu.findItem(R.id.save).setEnabled(false);
|
||||
}
|
||||
|
||||
/*
|
||||
* Show the menu items "Add attachment (Image)" and "Add attachment (Video)"
|
||||
@ -2040,7 +2042,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
public void onBackPressed() {
|
||||
if (mEncryptCheckbox.isChecked()) {
|
||||
showDialog(DIALOG_REFUSE_TO_SAVE_DRAFT_MARKED_ENCRYPTED);
|
||||
} else if (!mDraftNeedsSaving || (mDraftNeedsSaving && draftsDisabled())) {
|
||||
} else if (!mDraftNeedsSaving || draftsDisabled()) {
|
||||
Toast.makeText(MessageCompose.this, getString(R.string.message_discarded_toast), Toast.LENGTH_LONG).show();
|
||||
super.onBackPressed();
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user