From 7e250f2de054ffd8dc604d07c250361ba37b27da Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 11 Sep 2019 19:27:45 +0200 Subject: [PATCH] Added reset to duration dialog --- .../java/eu/faircode/email/FragmentDialogDuration.java | 10 ++++++++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 11 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogDuration.java b/app/src/main/java/eu/faircode/email/FragmentDialogDuration.java index d6b66ae377..a67f3103c8 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogDuration.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogDuration.java @@ -101,6 +101,16 @@ public class FragmentDialogDuration extends FragmentDialogEx { sendResult(RESULT_OK); } }) + .setNeutralButton(R.string.title_reset, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + Bundle args = getArguments(); + args.putLong("duration", 0); + args.putLong("time", new Date().getTime()); + + sendResult(RESULT_OK); + } + }) .create(); btn1hour.setOnClickListener(new View.OnClickListener() { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 378034f682..b7533d92a9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -808,6 +808,7 @@ 1 day Now After %1$s + Reset Accept Decline