Skip to content

Commit

Permalink
Update TAC and private policy URLs (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle authored Dec 16, 2024
1 parent e3b7144 commit 5488f91
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tchap Android

Tchap Android is an Android Matrix Client provided by [DINUM](https://tchap.beta.gouv.fr/). The app can be run on every Android devices with Android OS Lollipop and more (API 21).
Tchap Android is an Android Matrix Client provided by [DINUM](https://tchap.numerique.gouv.fr/). The app can be run on every Android devices with Android OS Lollipop and more (API 21).

[<img src="resources/img/google-play-badge.png" alt="Get it on Google Play" height="60">](https://play.google.com/store/apps/details?id=fr.gouv.tchap.a)

Expand Down
1 change: 1 addition & 0 deletions changelog.d/1143.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changement des URLs pour les CGU et la politique de confidentialité.
4 changes: 2 additions & 2 deletions vector-config/src/main/java/im/vector/app/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ object Config {
val DEBUG_ANALYTICS_CONFIG = Analytics.Enabled(
postHogHost = "https://us.i.posthog.com", // TCHAP dev posthog
postHogApiKey = "phc_eQOeaQiaIxdX9kaQmqYTD7RJLyFubYmGYKUI9czqqQD", // TCHAP dev posthog
policyLink = "https://tchap.beta.gouv.fr/politique-de-confidentialite",
policyLink = "https://tchap.numerique.gouv.fr/politique-de-confidentialite",
sentryDSN = "",
sentryEnvironment = "DEBUG"
)
Expand All @@ -98,7 +98,7 @@ object Config {
val RELEASE_ANALYTICS_CONFIG = Analytics.Enabled(
postHogHost = "https://posthogdev.tchap.incubateur.net", // TCHAP prod posthog
postHogApiKey = "phc_FFa4pkvmuWjF9nZOMmYJWUXMibuYnCnPyf3DqPGZs4L", // TCHAP prod posthog
policyLink = "https://tchap.beta.gouv.fr/politique-de-confidentialite",
policyLink = "https://tchap.numerique.gouv.fr/politique-de-confidentialite",
sentryDSN = "",
sentryEnvironment = "RELEASE"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ import im.vector.app.features.spaces.invite.SpaceInviteBottomSheet
import im.vector.app.features.spaces.share.ShareSpaceBottomSheet
import im.vector.app.features.themes.ThemeUtils
import im.vector.app.features.usercode.UserCodeActivity
import im.vector.app.features.webview.VectorWebViewActivity
import im.vector.app.features.workers.signout.ServerBackupStatusViewModel
import im.vector.lib.core.utils.compat.getParcelableExtraCompat
import im.vector.lib.strings.CommonStrings
Expand Down Expand Up @@ -237,12 +236,7 @@ class HomeActivity :
when (sharedAction) {
// TCHAP Custom implementation
is HomeActivitySharedAction.InviteByEmail -> Unit // no-op
HomeActivitySharedAction.OpenTermAndConditions -> {
// TCHAP the Term And Conditions url is detected as a permalink (same prefix), which make the application fail to open it from
// ChromeCustomTab, so we open it here directly in a WebView
val intent = VectorWebViewActivity.getIntent(this, VectorSettingsUrls.TAC, getString(CommonStrings.settings_app_term_conditions))
startActivity(intent)
}
HomeActivitySharedAction.OpenTermAndConditions -> openUrlInChromeCustomTab(this, null, VectorSettingsUrls.TAC)
HomeActivitySharedAction.OpenBugReport -> {
views.drawerLayout.closeDrawer(GravityCompat.START)
bugReporter.openBugReportScreen(this, ReportType.BUG_REPORT, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
package im.vector.app.features.settings

object VectorSettingsUrls {
// TCHAP Redirect to Tchap FAQ
const val HELP = "https://aide.tchap.beta.gouv.fr"
const val HELP = "https://aide.tchap.beta.gouv.fr" // TCHAP Redirect to FAQ
const val COPYRIGHT = "https://element.io/copyright"
const val TAC = "https://www.tchap.gouv.fr/tac.html"
const val PRIVACY_POLICY = "https://element.io/privacy"
const val TAC = "https://tchap.numerique.gouv.fr/cgu/" // TCHAP Redirect to CGU
const val PRIVACY_POLICY = "https://tchap.numerique.gouv.fr/politique-de-confidentialite" // TCHAP Redirect to privacy
const val THIRD_PARTY_LICENSES = "file:///android_asset/open_source_licenses.html"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class ElementLegals @Inject constructor(
*/
fun getData(): List<ServerPolicy> {
return listOf(
ServerPolicy(stringProvider.getString(CommonStrings.settings_app_term_conditions), VectorSettingsUrls.TAC)
ServerPolicy(stringProvider.getString(CommonStrings.settings_app_term_conditions), VectorSettingsUrls.TAC),
// TCHAP Hidden in Tchap
// ServerPolicy(stringProvider.getString(CommonStrings.settings_copyright), VectorSettingsUrls.COPYRIGHT),
// ServerPolicy(stringProvider.getString(CommonStrings.settings_acceptable_use_policy), VectorSettingsUrls.ACCEPTABLE_USE_POLICY),
// ServerPolicy(stringProvider.getString(CommonStrings.settings_privacy_policy), VectorSettingsUrls.PRIVACY_POLICY)
ServerPolicy(stringProvider.getString(CommonStrings.settings_privacy_policy), VectorSettingsUrls.PRIVACY_POLICY)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import im.vector.app.databinding.FragmentGenericRecyclerBinding
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.discovery.ServerPolicy
import im.vector.app.features.settings.VectorSettingsUrls
import im.vector.app.features.webview.VectorWebViewActivity
import im.vector.lib.strings.CommonStrings
import javax.inject.Inject

Expand Down Expand Up @@ -94,19 +93,10 @@ class LegalsFragment :

private fun openUrl(url: String) {
if (firstThrottler.canHandle() is FirstThrottler.CanHandlerResult.Yes) {
when {
url.startsWith("file://") -> {
activity?.displayInWebView(url)
}
url == VectorSettingsUrls.TAC -> {
// TCHAP the Term And Conditions url is detected as a permalink (same prefix), which make the application fail to open it from
// ChromeCustomTab, so we open it here directly in a WebView
val intent = VectorWebViewActivity.getIntent(requireActivity(), url, resources.getString(CommonStrings.settings_app_term_conditions))
activity?.startActivity(intent)
}
else -> {
openUrlInChromeCustomTab(requireContext(), null, url)
}
if (url.startsWith("file://")) {
activity?.displayInWebView(url)
} else {
openUrlInChromeCustomTab(requireContext(), null, url)
}
}
}
Expand Down

0 comments on commit 5488f91

Please sign in to comment.