From db5df4e35818c054cae5cb32632255dbd6f0e8a1 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 2 Feb 2020 20:22:41 +0100 Subject: [PATCH] Added rule executing feedback --- app/src/main/java/eu/faircode/email/AdapterRule.java | 6 ++++++ app/src/main/java/eu/faircode/email/FragmentRule.java | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/AdapterRule.java b/app/src/main/java/eu/faircode/email/AdapterRule.java index 63516d59ed..9586444089 100644 --- a/app/src/main/java/eu/faircode/email/AdapterRule.java +++ b/app/src/main/java/eu/faircode/email/AdapterRule.java @@ -34,6 +34,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.widget.PopupMenu; @@ -275,6 +276,11 @@ public class AdapterRule extends RecyclerView.Adapter { args.putLong("id", rule.id); new SimpleTask() { + @Override + protected void onPreExecute(Bundle args) { + ToastEx.makeText(context, R.string.title_executing, Toast.LENGTH_LONG).show(); + } + @Override protected Integer onExecute(Context context, Bundle args) throws JSONException, MessagingException, IOException { long id = args.getLong("id"); diff --git a/app/src/main/java/eu/faircode/email/FragmentRule.java b/app/src/main/java/eu/faircode/email/FragmentRule.java index 89cd866899..06d4f1a0f5 100644 --- a/app/src/main/java/eu/faircode/email/FragmentRule.java +++ b/app/src/main/java/eu/faircode/email/FragmentRule.java @@ -1143,6 +1143,11 @@ public class FragmentRule extends FragmentBase { @Override public void onClick(View v) { new SimpleTask() { + @Override + protected void onPreExecute(Bundle args) { + ToastEx.makeText(getContext(), R.string.title_executing, Toast.LENGTH_LONG).show(); + } + @Override protected Integer onExecute(Context context, Bundle args) throws Throwable { EntityRule rule = new EntityRule();