mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Printing is showing original
This commit is contained in:
parent
ae6d74762c
commit
bcdb5b5038
2 changed files with 28 additions and 1 deletions
|
@ -1997,6 +1997,33 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
}
|
||||
|
||||
private void onMenuPrint(final ActionData data) {
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (prefs.getBoolean("print_html_confirmed", false)) {
|
||||
onMenuPrintConfirmed(data);
|
||||
return;
|
||||
}
|
||||
|
||||
final View dview = LayoutInflater.from(context).inflate(R.layout.dialog_ask_again, null);
|
||||
final TextView tvMessage = dview.findViewById(R.id.tvMessage);
|
||||
final CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
|
||||
|
||||
tvMessage.setText(context.getText(R.string.title_ask_show_html));
|
||||
|
||||
new DialogBuilderLifecycle(context, owner)
|
||||
.setView(dview)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (cbNotAgain.isChecked())
|
||||
prefs.edit().putBoolean("print_html_confirmed", true).apply();
|
||||
onMenuPrintConfirmed(data);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show();
|
||||
}
|
||||
|
||||
private void onMenuPrintConfirmed(final ActionData data) {
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("id", data.message.id);
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
|||
"notify_preview", "search_local", "light", "sound",
|
||||
"updates", "debug",
|
||||
"first", "why", "last_update_check", "app_support", "message_swipe", "message_select", "folder_actions", "folder_sync",
|
||||
"edit_ref_confirmed", "show_html_confirmed", "show_images_confirmed"
|
||||
"edit_ref_confirmed", "show_html_confirmed", "show_images_confirmed", "print_html_confirmed"
|
||||
};
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue