Browse Source

Discard drafts

main
M66B 6 years ago
parent
commit
52be6a33ae
3 changed files with 6 additions and 4 deletions
  1. +2
    -2
      app/src/main/java/eu/faircode/email/FragmentCompose.java
  2. +1
    -1
      app/src/main/res/menu/action_compose.xml
  3. +3
    -1
      app/src/main/res/values/strings.xml

+ 2
- 2
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -241,7 +241,7 @@ public class FragmentCompose extends FragmentEx {
int action = item.getItemId(); int action = item.getItemId();
if (action == R.id.action_delete) { if (action == R.id.action_delete) {
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner()) new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
.setMessage(R.string.title_ask_delete)
.setMessage(R.string.title_ask_discard)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
@ -629,7 +629,7 @@ public class FragmentCompose extends FragmentEx {
private void handleExit() { private void handleExit() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)) if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner()) new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
.setMessage(R.string.title_ask_delete)
.setMessage(R.string.title_ask_discard)
.setPositiveButton(R.string.title_yes, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.title_yes, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {


+ 1
- 1
app/src/main/res/menu/action_compose.xml View File

@ -5,7 +5,7 @@
<item <item
android:id="@+id/action_delete" android:id="@+id/action_delete"
android:icon="@drawable/baseline_delete_24" android:icon="@drawable/baseline_delete_24"
android:title="@string/title_delete"
android:title="@string/title_discard"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<item <item


+ 3
- 1
app/src/main/res/values/strings.xml View File

@ -192,6 +192,7 @@
<string name="title_attachment_saved">Attachment saved</string> <string name="title_attachment_saved">Attachment saved</string>
<string name="title_attachment_unavailable">Some attachments are not downloaded and will not be forwarded, continue?</string> <string name="title_attachment_unavailable">Some attachments are not downloaded and will not be forwarded, continue?</string>
<string name="title_ask_delete">Delete message permanently?</string> <string name="title_ask_delete">Delete message permanently?</string>
<string name="title_ask_discard">Discard draft?</string>
<string name="title_ask_spam">Report message as spam?</string> <string name="title_ask_spam">Report message as spam?</string>
<string name="title_compose">Compose</string> <string name="title_compose">Compose</string>
@ -202,6 +203,7 @@
<string name="title_bcc">BCC:</string> <string name="title_bcc">BCC:</string>
<string name="title_subject">Subject:</string> <string name="title_subject">Subject:</string>
<string name="title_body_hint">Your message</string> <string name="title_body_hint">Your message</string>
<string name="title_discard">Discard</string>
<string name="title_save">Save</string> <string name="title_save">Save</string>
<string name="title_send">Send</string> <string name="title_send">Send</string>
@ -216,7 +218,7 @@
<string name="title_from_missing">Sender missing</string> <string name="title_from_missing">Sender missing</string>
<string name="title_to_missing">Recipient missing</string> <string name="title_to_missing">Recipient missing</string>
<string name="title_attachments_missing">Attachments still loading</string> <string name="title_attachments_missing">Attachments still loading</string>
<string name="title_draft_deleted">Draft deleted</string>
<string name="title_draft_deleted">Draft discarded</string>
<string name="title_draft_saved">Draft saved</string> <string name="title_draft_saved">Draft saved</string>
<string name="title_queued">Sending message</string> <string name="title_queued">Sending message</string>


Loading…
Cancel
Save