pull/196/head
M66B 4 years ago
parent b54bc0cfa6
commit f86cd53232

@ -355,6 +355,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
private static final int REQUEST_BOUNDARY_RETRY = 22; private static final int REQUEST_BOUNDARY_RETRY = 22;
static final int REQUEST_PICK_CONTACT = 23; static final int REQUEST_PICK_CONTACT = 23;
static final int REQUEST_BUTTONS = 24; static final int REQUEST_BUTTONS = 24;
private static final int REQUEST_ASKED_RAW = 25;
static final String ACTION_STORE_RAW = BuildConfig.APPLICATION_ID + ".STORE_RAW"; static final String ACTION_STORE_RAW = BuildConfig.APPLICATION_ID + ".STORE_RAW";
static final String ACTION_DECRYPT = BuildConfig.APPLICATION_ID + ".DECRYPT"; static final String ACTION_DECRYPT = BuildConfig.APPLICATION_ID + ".DECRYPT";
@ -3307,6 +3308,25 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
} }
private void onActionRaw() { private void onActionRaw() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
boolean raw_asked = prefs.getBoolean("raw_asked", false);
if (raw_asked) {
_onActionRaw();
return;
}
Bundle args = new Bundle();
args.putString("question", getString(R.string.title_ask_raw));
args.putString("notagain", "raw_asked");
FragmentDialogAsk ask = new FragmentDialogAsk();
ask.setArguments(args);
ask.setTargetFragment(FragmentMessages.this, REQUEST_ASKED_RAW);
ask.show(getParentFragmentManager(), "messages:raw");
}
private void _onActionRaw() {
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putLongArray("ids", getSelection()); args.putLongArray("ids", getSelection());
@ -6043,6 +6063,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
case REQUEST_BUTTONS: case REQUEST_BUTTONS:
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
break; break;
case REQUEST_ASKED_RAW:
_onActionRaw();
break;
} }
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex); Log.e(ex);

@ -151,6 +151,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
"selected_folders", "move_1_confirmed", "move_n_confirmed", "selected_folders", "move_1_confirmed", "move_n_confirmed",
"last_search_senders", "last_search_recipients", "last_search_subject", "last_search_keywords", "last_search_message", "last_search", "last_search_senders", "last_search_recipients", "last_search_subject", "last_search_keywords", "last_search_message", "last_search",
"identities_asked", "identities_primary_hint", "identities_asked", "identities_primary_hint",
"raw_asked",
"cc_bcc", "inline_image_hint", "compose_reference", "send_dialog", "cc_bcc", "inline_image_hint", "compose_reference", "send_dialog",
"setup_reminder", "setup_advanced" "setup_reminder", "setup_advanced"
}; };

@ -964,6 +964,7 @@
<string name="title_ask_help">Help improve FairEmail</string> <string name="title_ask_help">Help improve FairEmail</string>
<string name="title_ask_reporting">Send error reports?</string> <string name="title_ask_reporting">Send error reports?</string>
<string name="title_reporting_why">Error reporting will help improve FairEmail</string> <string name="title_reporting_why">Error reporting will help improve FairEmail</string>
<string name="title_ask_raw">To forward messages, the raw (original) message needs to be downloaded</string>
<string name="title_ask_review">Please review FairEmail</string> <string name="title_ask_review">Please review FairEmail</string>
<string name="title_ask_review_rationale"> <string name="title_ask_review_rationale">

Loading…
Cancel
Save