1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Auto link after sanitize

This commit is contained in:
M66B 2021-12-05 15:06:45 +01:00
parent ba1f517e4e
commit b7207e4217

View file

@ -2555,10 +2555,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
HtmlHelper.cleanup(document);
HtmlHelper.removeRelativeLinks(document);
HtmlHelper.autoLink(document);
if (message.ui_found && found && !TextUtils.isEmpty(searched))
HtmlHelper.highlightSearched(context, document, searched);
// Check for inline encryption
boolean iencrypted = HtmlHelper.contains(document, new String[]{
@ -2608,6 +2604,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
.text(context.getString(R.string.title_truncated));
HtmlHelper.guessSchemes(document);
HtmlHelper.autoLink(document);
if (message.ui_found && found && !TextUtils.isEmpty(searched))
HtmlHelper.highlightSearched(context, document, searched);
boolean overview_mode = prefs.getBoolean("overview_mode", false);
boolean override_width = prefs.getBoolean("override_width", false);
@ -2637,6 +2637,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
// Cleanup message
document = HtmlHelper.sanitizeView(context, document, show_images);
HtmlHelper.autoLink(document);
if (message.ui_found && found && !TextUtils.isEmpty(searched))
HtmlHelper.highlightSearched(context, document, searched);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
args.putParcelable("actions", getConversationActions(message, document, context));