From 45314498b0fa2ec769de1eaf1db33ec56bb3cb75 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 4 Apr 2021 15:33:09 +0200 Subject: [PATCH] Show original link --- .../eu/faircode/email/FragmentDialogOpenLink.java | 3 +++ app/src/main/res/layout/dialog_open_link.xml | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogOpenLink.java b/app/src/main/java/eu/faircode/email/FragmentDialogOpenLink.java index 4e7720921e..479f14608d 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 tvLink = dview.findViewById(R.id.tvLink); final TextView tvSuspicious = dview.findViewById(R.id.tvSuspicious); final TextView tvDisconnect = dview.findViewById(R.id.tvDisconnect); final TextView tvDisconnectCategories = dview.findViewById(R.id.tvDisconnectCategories); @@ -320,9 +321,11 @@ public class FragmentDialogOpenLink extends FragmentDialogBase { if (host != null && !host.equals(puny)) { etLink.setText(uri.buildUpon().encodedAuthority(puny).build().toString()); + tvLink.setText(uri.toString()); tvSuspicious.setVisibility(View.VISIBLE); } else { etLink.setText(uri.toString()); + tvLink.setText(null); tvSuspicious.setVisibility(Helper.isSingleScript(host) ? View.GONE : View.VISIBLE); } diff --git a/app/src/main/res/layout/dialog_open_link.xml b/app/src/main/res/layout/dialog_open_link.xml index efd057987e..897448fca2 100644 --- a/app/src/main/res/layout/dialog_open_link.xml +++ b/app/src/main/res/layout/dialog_open_link.xml @@ -56,6 +56,20 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvTitle" /> + +