Very suspicious

This commit is contained in:
M66B 2021-04-04 13:40:23 +02:00
parent 134e10c691
commit e54a9a2ecd
3 changed files with 21 additions and 6 deletions

View File

@ -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<String> categories = null;
if (disconnect_links)

View File

@ -89,6 +89,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibCopy" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvSuspicious"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_suspicious_link"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?attr/colorWarning"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDifferent" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvDisconnect"
android:layout_width="wrap_content"
@ -99,7 +111,7 @@
android:textColor="?attr/colorWarning"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDifferent" />
app:layout_constraintTop_toBottomOf="@id/tvSuspicious" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvDisconnectCategories"

View File

@ -1426,6 +1426,7 @@
<string name="title_open_link">Open link</string>
<string name="title_different_link">The title and the link address are different</string>
<string name="title_tracking_link">This website might track you</string>
<string name="title_suspicious_link">This is a suspicious link</string>
<string name="title_link_http">Traffic will not be encrypted</string>
<string name="title_link_https">Traffic will be encrypted</string>
<string name="title_sanitize_link">Remove tracking parameters</string>