From e54a9a2ecdf1c4ac3572e2b5ce2ac17695f4f23a Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 4 Apr 2021 13:40:23 +0200 Subject: [PATCH] Very suspicious --- .../eu/faircode/email/FragmentDialogOpenLink.java | 12 +++++++----- app/src/main/res/layout/dialog_open_link.xml | 14 +++++++++++++- app/src/main/res/values/strings.xml | 1 + 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogOpenLink.java b/app/src/main/java/eu/faircode/email/FragmentDialogOpenLink.java index 272c29ae0c..aa0d72a78b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogOpenLink.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogOpenLink.java @@ -123,6 +123,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase { final TextView tvTitle = dview.findViewById(R.id.tvTitle); final ImageButton ibDifferent = dview.findViewById(R.id.ibDifferent); final EditText etLink = dview.findViewById(R.id.etLink); + final TextView tvSuspicious = dview.findViewById(R.id.tvSuspicious); final TextView tvDisconnect = dview.findViewById(R.id.tvDisconnect); final TextView tvDisconnectCategories = dview.findViewById(R.id.tvDisconnectCategories); final ImageButton ibShare = dview.findViewById(R.id.ibShare); @@ -318,15 +319,16 @@ public class FragmentDialogOpenLink extends FragmentDialogBase { if (host != null && !host.equals(puny)) { etLink.setText(uri.buildUpon().encodedAuthority(puny).build().toString()); - grpDifferent.setVisibility(View.VISIBLE); + tvSuspicious.setVisibility(View.VISIBLE); } else { etLink.setText(uri.toString()); - - grpDifferent.setVisibility( - host == null || thost == null || host.equalsIgnoreCase(thost) - ? View.GONE : View.VISIBLE); + tvSuspicious.setVisibility(View.GONE); } + grpDifferent.setVisibility( + host == null || thost == null || host.equalsIgnoreCase(thost) + ? View.GONE : View.VISIBLE); + boolean disconnect_links = prefs.getBoolean("disconnect_links", true); List categories = null; if (disconnect_links) diff --git a/app/src/main/res/layout/dialog_open_link.xml b/app/src/main/res/layout/dialog_open_link.xml index b7016f7f1b..efd057987e 100644 --- a/app/src/main/res/layout/dialog_open_link.xml +++ b/app/src/main/res/layout/dialog_open_link.xml @@ -89,6 +89,18 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/ibCopy" /> + + + app:layout_constraintTop_toBottomOf="@id/tvSuspicious" /> Open link The title and the link address are different This website might track you + This is a suspicious link Traffic will not be encrypted Traffic will be encrypted Remove tracking parameters