Commit 3918af91 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Hide the privacy policy text if private DNS is active

Together with the PrivateDNS warning text this text would imply that Nebulo knows the privacy policy of the server active, which it does not.
parent 31c7fd53
......@@ -230,6 +230,7 @@ class MainFragment : Fragment() {
private fun updateVpnIndicators() {
val privateDnsActive = requireContext().isPrivateDnsActive
var startButtonVisibility = View.VISIBLE
var privacyTextVisibility = View.VISIBLE
when(proxyState) {
ProxyState.RUNNING -> {
privateDnsInfo.visibility = View.INVISIBLE
......@@ -252,6 +253,7 @@ class MainFragment : Fragment() {
if (privateDnsActive) {
statusImage.setImageResource(R.drawable.ic_lock)
statusImage.clearAnimation()
privacyTextVisibility = View.INVISIBLE
startButtonVisibility = View.INVISIBLE
privateDnsInfo.visibility = View.VISIBLE
} else {
......@@ -262,6 +264,7 @@ class MainFragment : Fragment() {
}
}
startButton.visibility = startButtonVisibility
privacyTextWrap.visibility = privacyTextVisibility
}
private fun updatePrivacyPolicyLink(serverInfo: DnsServerInformation<*>) {
......
......@@ -40,26 +40,33 @@
android:layout_alignParentBottom="true"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:contentDescription="@string/contentdescription_main_infoimage"
android:drawableStart="@drawable/ic_info"
android:drawablePadding="8dp"
android:text="@string/main_dnssurveillance_infotext" />
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:id="@+id/privacyTextWrap"
android:layout_height="wrap_content">
<TextView
android:id="@+id/privacyStatementText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:drawableStart="@drawable/ic_caret_right"
android:drawablePadding="8dp"
android:gravity="center"
android:textStyle="italic" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:contentDescription="@string/contentdescription_main_infoimage"
android:drawableStart="@drawable/ic_info"
android:drawablePadding="8dp"
android:text="@string/main_dnssurveillance_infotext" />
<TextView
android:id="@+id/privacyStatementText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="8dp"
android:visibility="gone"
android:drawableStart="@drawable/ic_caret_right"
android:drawablePadding="8dp"
android:gravity="center"
android:textStyle="italic" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment