Cleanup
This commit is contained in:
parent
8672ee9365
commit
0f873683f7
2 changed files with 9 additions and 11 deletions
|
@ -789,10 +789,15 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
private void onDiscard() {
|
||||
if (draftMessageId != null) {
|
||||
messagingController.deleteDraft(account, draftMessageId);
|
||||
draftMessageId = null;
|
||||
}
|
||||
internalMessageHandler.sendEmptyMessage(MSG_DISCARDED_DRAFT);
|
||||
finishWithoutChanges();
|
||||
}
|
||||
|
||||
private void finishWithoutChanges() {
|
||||
draftMessageId = null;
|
||||
changesMadeSinceLastSave = false;
|
||||
|
||||
if (navigateUp) {
|
||||
openDefaultFolder();
|
||||
} else {
|
||||
|
@ -1119,20 +1124,13 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
});
|
||||
} else {
|
||||
builder
|
||||
.setMessage(R.string.save_or_discard_draft_message_changes_instructions_fmt)
|
||||
.setMessage(R.string.save_or_discard_draft_message_changes)
|
||||
.setNegativeButton(R.string.discard_action, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
dismissDialog(DIALOG_SAVE_OR_DISCARD_DRAFT_MESSAGE);
|
||||
changesMadeSinceLastSave = false;
|
||||
draftMessageId = null;
|
||||
if (navigateUp) {
|
||||
openDefaultFolder();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
finishWithoutChanges();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
return builder
|
||||
|
|
|
@ -897,7 +897,7 @@ Please submit bug reports, contribute new features and ask questions at
|
|||
|
||||
<string name="save_or_discard_draft_message_dlg_title">Save draft message?</string>
|
||||
<string name="save_or_discard_draft_message_instructions_fmt">Save or Discard this message?</string>
|
||||
<string name="save_or_discard_draft_message_changes_instructions_fmt">Save or Discard changes?</string>
|
||||
<string name="save_or_discard_draft_message_changes">Save or Discard changes?</string>
|
||||
|
||||
<string name="confirm_discard_draft_message_title">Discard message?</string>
|
||||
<string name="confirm_discard_draft_message">Are you sure you want to discard this message?</string>
|
||||
|
|
Loading…
Reference in a new issue