mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05: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;
|
mDraftNeedsSaving = false;
|
||||||
|
|
||||||
if (!draftsDisabled())
|
if (!draftsDisabled()) {
|
||||||
saveMessage();
|
saveMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEncryptionKeySelectionDone() {
|
public void onEncryptionKeySelectionDone() {
|
||||||
@ -2012,8 +2013,9 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
getMenuInflater().inflate(R.menu.message_compose_option, menu);
|
getMenuInflater().inflate(R.menu.message_compose_option, menu);
|
||||||
|
|
||||||
// Disable the 'Save' menu option if folder is set to NONE
|
// Disable the 'Save' menu option if folder is set to NONE
|
||||||
if (draftsDisabled())
|
if (draftsDisabled()) {
|
||||||
menu.findItem(R.id.save).setEnabled(false);
|
menu.findItem(R.id.save).setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show the menu items "Add attachment (Image)" and "Add attachment (Video)"
|
* 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() {
|
public void onBackPressed() {
|
||||||
if (mEncryptCheckbox.isChecked()) {
|
if (mEncryptCheckbox.isChecked()) {
|
||||||
showDialog(DIALOG_REFUSE_TO_SAVE_DRAFT_MARKED_ENCRYPTED);
|
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();
|
Toast.makeText(MessageCompose.this, getString(R.string.message_discarded_toast), Toast.LENGTH_LONG).show();
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user