From e7f91c9c3a979255b883de619e491340b4730e8f Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 11 Nov 2024 09:13:39 +0100 Subject: [PATCH] Experiment: fast forward --- FAQ.md | 6 ++++++ .../eu/faircode/email/FragmentMessages.java | 19 ++++++++++++------- index.html | 18 +++++++++++++++--- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/FAQ.md b/FAQ.md index b08d3361eb..46719a2143 100644 --- a/FAQ.md +++ b/FAQ.md @@ -4267,6 +4267,12 @@ See [this FAQ](#faq71)
+*Fast forward (1.2226+)* + +Show (fast) *Forward to* in the answer menu, with adresses recently used for forwarding messages. + +
+ **(126) Can message previews be sent to my smartwatch?** diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 54908d9141..52d75dd315 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -4074,6 +4074,9 @@ public class FragmentMessages extends FragmentBase protected ReplyData onExecute(Context context, Bundle args) { long id = args.getLong("id"); + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); + boolean experiments = prefs.getBoolean("experiments", false); + ReplyData result = new ReplyData(); DB db = DB.getInstance(context); @@ -4088,13 +4091,15 @@ public class FragmentMessages extends FragmentBase result.answers = db.answer().getAnswersByFavorite(true); result.forwarded = new ArrayList<>(); - long last = new Date().getTime() - MAX_FORWARD_ADDRESS_AGE; - List fwds = db.message().getForwardAddresses(message.account, last); - if (fwds != null) - for (String fwd : fwds) - for (Address address : DB.Converters.decodeAddresses(fwd)) - if (address instanceof InternetAddress) - result.forwarded.add((InternetAddress) address); + if (experiments) { + long last = new Date().getTime() - MAX_FORWARD_ADDRESS_AGE; + List fwds = db.message().getForwardAddresses(message.account, last); + if (fwds != null) + for (String fwd : fwds) + for (Address address : DB.Converters.decodeAddresses(fwd)) + if (address instanceof InternetAddress) + result.forwarded.add((InternetAddress) address); + } return result; } diff --git a/index.html b/index.html index 09a832cd31..6b089f840c 100644 --- a/index.html +++ b/index.html @@ -8,10 +8,19 @@ @@ -2220,6 +2229,9 @@ $NotDisplayed

Rule expression condition (1.2174+)

See this FAQ


+

Fast forward (1.2226+)

+

Show (fast) Forward to in the answer menu, with adresses recently used for forwarding messages.

+


(126) Can message previews be sent to my smartwatch?

🌎 Google Translate

FairEmail fetches a message in two steps: