mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 23:12:55 +00:00
Added remark about ipinfo.io
This commit is contained in:
parent
75a26bf68d
commit
ba4fc168de
3 changed files with 18 additions and 1 deletions
|
@ -53,6 +53,7 @@ import android.text.Spanned;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.text.method.ArrowKeyMovementMethod;
|
import android.text.method.ArrowKeyMovementMethod;
|
||||||
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.text.style.DynamicDrawableSpan;
|
import android.text.style.DynamicDrawableSpan;
|
||||||
import android.text.style.ImageSpan;
|
import android.text.style.ImageSpan;
|
||||||
import android.text.style.QuoteSpan;
|
import android.text.style.QuoteSpan;
|
||||||
|
@ -3398,6 +3399,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
final CheckBox cbSecure = view.findViewById(R.id.cbSecure);
|
final CheckBox cbSecure = view.findViewById(R.id.cbSecure);
|
||||||
CheckBox cbSanitize = view.findViewById(R.id.cbSanitize);
|
CheckBox cbSanitize = view.findViewById(R.id.cbSanitize);
|
||||||
final Button btnOwner = view.findViewById(R.id.btnOwner);
|
final Button btnOwner = view.findViewById(R.id.btnOwner);
|
||||||
|
TextView tvOwnerRemark = view.findViewById(R.id.tvOwnerRemark);
|
||||||
final ContentLoadingProgressBar pbWait = view.findViewById(R.id.pbWait);
|
final ContentLoadingProgressBar pbWait = view.findViewById(R.id.pbWait);
|
||||||
final TextView tvOwner = view.findViewById(R.id.tvOwner);
|
final TextView tvOwner = view.findViewById(R.id.tvOwner);
|
||||||
final TextView tvHost = view.findViewById(R.id.tvHost);
|
final TextView tvHost = view.findViewById(R.id.tvHost);
|
||||||
|
@ -3434,6 +3436,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
secure ? android.R.attr.textColorSecondary : R.attr.colorWarning));
|
secure ? android.R.attr.textColorSecondary : R.attr.colorWarning));
|
||||||
cbSecure.setTypeface(
|
cbSecure.setTypeface(
|
||||||
secure ? Typeface.DEFAULT : Typeface.DEFAULT_BOLD);
|
secure ? Typeface.DEFAULT : Typeface.DEFAULT_BOLD);
|
||||||
|
|
||||||
cbSecure.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
cbSecure.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
@ -3460,6 +3463,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
});
|
});
|
||||||
|
|
||||||
cbSanitize.setVisibility(uri.equals(sanitized) ? View.GONE : View.VISIBLE);
|
cbSanitize.setVisibility(uri.equals(sanitized) ? View.GONE : View.VISIBLE);
|
||||||
|
|
||||||
cbSanitize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
cbSanitize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
@ -3470,8 +3474,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
tvOwnerRemark.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
pbWait.setVisibility(View.GONE);
|
pbWait.setVisibility(View.GONE);
|
||||||
grpOwner.setVisibility(View.GONE);
|
grpOwner.setVisibility(View.GONE);
|
||||||
|
|
||||||
btnOwner.setOnClickListener(new View.OnClickListener() {
|
btnOwner.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
|
@ -85,6 +85,16 @@
|
||||||
app:layout_constraintStart_toEndOf="@id/btnOwner"
|
app:layout_constraintStart_toEndOf="@id/btnOwner"
|
||||||
app:layout_constraintTop_toTopOf="@id/btnOwner" />
|
app:layout_constraintTop_toTopOf="@id/btnOwner" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvOwnerRemark"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/title_remark_owner"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/btnOwner" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvOwnerTitle"
|
android:id="@+id/tvOwnerTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -94,7 +104,7 @@
|
||||||
android:text="@string/title_ip_owner"
|
android:text="@string/title_ip_owner"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/btnOwner" />
|
app:layout_constraintTop_toBottomOf="@id/tvOwnerRemark" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvHost"
|
android:id="@+id/tvHost"
|
||||||
|
|
|
@ -704,6 +704,7 @@
|
||||||
<string name="title_sanitize_link">Remove tracking parameters</string>
|
<string name="title_sanitize_link">Remove tracking parameters</string>
|
||||||
<string name="title_insecure_link">This link is insecure</string>
|
<string name="title_insecure_link">This link is insecure</string>
|
||||||
<string name="title_check_owner">Check owner</string>
|
<string name="title_check_owner">Check owner</string>
|
||||||
|
<string name="title_remark_owner">Information will be retrieved from <a href="https://ipinfo.io/">ipinfo.io</a></string>
|
||||||
<string name="title_ip_owner">Owner IP address</string>
|
<string name="title_ip_owner">Owner IP address</string>
|
||||||
<string name="title_select_app">Select app</string>
|
<string name="title_select_app">Select app</string>
|
||||||
<string name="title_updated">There is an update to version %1$s available</string>
|
<string name="title_updated">There is an update to version %1$s available</string>
|
||||||
|
|
Loading…
Reference in a new issue