Use CustomChromeTab to open T&C

This commit is contained in:
Benoit Marty 2020-06-17 19:04:35 +02:00
parent 86b4c9ac73
commit af81a52746
2 changed files with 5 additions and 5 deletions

View File

@ -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)
}
}

View File

@ -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)
}
}