From c35c94b7b7159320bfa42e3bc57aba88143f01ff Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 10 Jun 2020 09:13:08 +0200 Subject: [PATCH] Update link to Modular url from "https://modular.im/" to "https://modular.im/services/matrix-hosting-riot" and open it using ChromeCustomTab --- CHANGES.md | 1 + .../src/main/java/im/vector/riotx/features/login/Config.kt | 5 ++++- .../riotx/features/login/LoginServerSelectionFragment.kt | 4 ++-- .../riotx/features/login/LoginServerUrlFormFragment.kt | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 95a3b88df3..b9f8180c91 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -33,6 +33,7 @@ Build 🧱: Other changes: - Send plain text in the body of events containing formatted body, as per https://matrix.org/docs/spec/client_server/latest#m-room-message-msgtypes + - Update link to Modular url from "https://modular.im/" to "https://modular.im/services/matrix-hosting-riot" and open it using ChromeCustomTab Changes in RiotX 0.21.0 (2020-05-28) =================================================== diff --git a/vector/src/main/java/im/vector/riotx/features/login/Config.kt b/vector/src/main/java/im/vector/riotx/features/login/Config.kt index e35923f5b0..66db981b1c 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/Config.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/Config.kt @@ -16,4 +16,7 @@ package im.vector.riotx.features.login -const val MODULAR_LINK = "https://modular.im/?utm_source=riot-x-android&utm_medium=native&utm_campaign=riot-x-android-authentication" +const val MODULAR_LINK = "https://modular.im/services/matrix-hosting-riot" + + "?utm_source=riot-x-android" + + "&utm_medium=native" + + "&utm_campaign=riot-x-android-authentication" diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt index e947a31c25..79c5c7d024 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt @@ -21,7 +21,7 @@ import android.view.View import butterknife.OnClick import com.airbnb.mvrx.withState import im.vector.riotx.R -import im.vector.riotx.core.utils.openUrlInExternalBrowser +import im.vector.riotx.core.utils.openUrlInChromeCustomTab import kotlinx.android.synthetic.main.fragment_login_server_selection.* import me.gujun.android.span.span import javax.inject.Inject @@ -56,7 +56,7 @@ class LoginServerSelectionFragment @Inject constructor() : AbstractLoginFragment @OnClick(R.id.loginServerChoiceModularLearnMore) fun learnMore() { - openUrlInExternalBrowser(requireActivity(), MODULAR_LINK) + openUrlInChromeCustomTab(requireActivity(), null, MODULAR_LINK) } @OnClick(R.id.loginServerChoiceMatrixOrg) diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt index 6edd9d06ab..cb90ef2397 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt @@ -26,7 +26,7 @@ import com.jakewharton.rxbinding3.widget.textChanges import im.vector.riotx.R import im.vector.riotx.core.extensions.hideKeyboard import im.vector.riotx.core.utils.ensureProtocol -import im.vector.riotx.core.utils.openUrlInExternalBrowser +import im.vector.riotx.core.utils.openUrlInChromeCustomTab import kotlinx.android.synthetic.main.fragment_login_server_url_form.* import javax.inject.Inject @@ -84,7 +84,7 @@ class LoginServerUrlFormFragment @Inject constructor() : AbstractLoginFragment() @OnClick(R.id.loginServerUrlFormLearnMore) fun learnMore() { - openUrlInExternalBrowser(requireActivity(), MODULAR_LINK) + openUrlInChromeCustomTab(requireActivity(), null, MODULAR_LINK) } override fun resetViewModel() {