From af81a527464f47c3b81748de63311d5377810a76 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 17 Jun 2020 19:04:35 +0200 Subject: [PATCH] Use CustomChromeTab to open T&C --- .../vector/riotx/features/login/terms/LoginTermsFragment.kt | 6 +++--- .../im/vector/riotx/features/terms/ReviewTermsFragment.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/login/terms/LoginTermsFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/terms/LoginTermsFragment.kt index 88f4fc2f5f..49abc9ba81 100755 --- a/vector/src/main/java/im/vector/riotx/features/login/terms/LoginTermsFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/terms/LoginTermsFragment.kt @@ -21,17 +21,17 @@ import android.os.Parcelable import android.view.View import butterknife.OnClick import com.airbnb.mvrx.args +import im.vector.matrix.android.internal.auth.registration.LocalizedFlowDataLoginTerms import im.vector.riotx.R import im.vector.riotx.core.extensions.cleanup import im.vector.riotx.core.extensions.configureWith import im.vector.riotx.core.extensions.toReducedUrl -import im.vector.riotx.core.utils.openUrlInExternalBrowser +import im.vector.riotx.core.utils.openUrlInChromeCustomTab import im.vector.riotx.features.login.AbstractLoginFragment import im.vector.riotx.features.login.LoginAction import im.vector.riotx.features.login.LoginViewState import kotlinx.android.parcel.Parcelize import kotlinx.android.synthetic.main.fragment_login_terms.* -import im.vector.matrix.android.internal.auth.registration.LocalizedFlowDataLoginTerms import javax.inject.Inject @Parcelize @@ -95,7 +95,7 @@ class LoginTermsFragment @Inject constructor( localizedFlowDataLoginTerms.localizedUrl ?.takeIf { it.isNotBlank() } ?.let { - openUrlInExternalBrowser(requireContext(), it) + openUrlInChromeCustomTab(requireContext(), null, it) } } diff --git a/vector/src/main/java/im/vector/riotx/features/terms/ReviewTermsFragment.kt b/vector/src/main/java/im/vector/riotx/features/terms/ReviewTermsFragment.kt index ecf5818300..0adfa049fe 100644 --- a/vector/src/main/java/im/vector/riotx/features/terms/ReviewTermsFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/terms/ReviewTermsFragment.kt @@ -30,7 +30,7 @@ import im.vector.riotx.core.extensions.configureWith import im.vector.riotx.core.extensions.exhaustive import im.vector.riotx.core.platform.VectorBaseActivity import im.vector.riotx.core.platform.VectorBaseFragment -import im.vector.riotx.core.utils.openUrlInExternalBrowser +import im.vector.riotx.core.utils.openUrlInChromeCustomTab import kotlinx.android.synthetic.main.fragment_review_terms.* import javax.inject.Inject @@ -106,6 +106,6 @@ class ReviewTermsFragment @Inject constructor( } override fun review(term: Term) { - openUrlInExternalBrowser(requireContext(), term.url) + openUrlInChromeCustomTab(requireContext(), null, term.url) } }