diff --git a/vector/src/main/java/im/vector/app/features/login/LoginSplashFragment.kt b/vector/src/main/java/im/vector/app/features/login/LoginSplashFragment.kt
index 527f9f99b3..02c92ddfe0 100644
--- a/vector/src/main/java/im/vector/app/features/login/LoginSplashFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/login/LoginSplashFragment.kt
@@ -25,8 +25,10 @@ import androidx.core.view.isVisible
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import im.vector.app.BuildConfig
import im.vector.app.R
+import im.vector.app.core.utils.openUrlInChromeCustomTab
import im.vector.app.databinding.FragmentLoginSplashBinding
import im.vector.app.features.settings.VectorPreferences
+import im.vector.app.features.settings.VectorSettingsUrls
import org.matrix.android.sdk.api.failure.Failure
import java.net.UnknownHostException
import javax.inject.Inject
@@ -50,6 +52,7 @@ class LoginSplashFragment @Inject constructor(
private fun setupViews() {
views.loginSplashSubmit.debouncedClicks { getStarted() }
+ views.showPrivacyPolicyButton.debouncedClicks { showPrivacyPolicy() }
if (BuildConfig.DEBUG || vectorPreferences.developerMode()) {
views.loginSplashVersion.isVisible = true
@@ -64,6 +67,10 @@ class LoginSplashFragment @Inject constructor(
loginViewModel.handle(LoginAction.OnGetStarted(resetLoginConfig = false))
}
+ private fun showPrivacyPolicy() {
+ openUrlInChromeCustomTab(requireContext(), null, VectorSettingsUrls.PRIVACY_POLICY)
+ }
+
override fun resetViewModel() {
// Nothing to do
}
diff --git a/vector/src/main/res/layout/fragment_login_splash.xml b/vector/src/main/res/layout/fragment_login_splash.xml
index 889db114df..1512083d0d 100644
--- a/vector/src/main/res/layout/fragment_login_splash.xml
+++ b/vector/src/main/res/layout/fragment_login_splash.xml
@@ -198,6 +198,19 @@
app:layout_constraintTop_toBottomOf="@+id/loginSplashSubmit"
app:layout_constraintVertical_weight="4" />
+
+