diff --git a/changelog.d/906.bugfix b/changelog.d/906.bugfix new file mode 100644 index 0000000000..296a65227c --- /dev/null +++ b/changelog.d/906.bugfix @@ -0,0 +1 @@ +Ouverture de l'aide dans l'application au lieu du navigateur. \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt index a70af58912..a6e3b70868 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt @@ -689,9 +689,12 @@ class HomeActivity : launchQrCode() true } - // TCHAP new faq entry + // TCHAP new faq entry. + // the FAQ 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 R.id.menu_home_faq -> { - openUrlInChromeCustomTab(this, null, VectorSettingsUrls.HELP) + val intent = VectorWebViewActivity.getIntent(this, VectorSettingsUrls.HELP, getString(R.string.preference_help)) + startActivity(intent) true } else -> false diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsRootFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsRootFragment.kt index 63588b1efb..aa3ce96221 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsRootFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsRootFragment.kt @@ -27,6 +27,7 @@ import im.vector.app.core.utils.openUrlInChromeCustomTab import im.vector.app.features.VectorFeatures import im.vector.app.features.analytics.plan.MobileScreen import im.vector.app.features.displayname.getBestName +import im.vector.app.features.webview.VectorWebViewActivity import org.matrix.android.sdk.api.session.getUserOrDefault import org.matrix.android.sdk.api.util.toMatrixItem import javax.inject.Inject @@ -54,7 +55,8 @@ class VectorSettingsRootFragment : findPreference(VectorPreferences.SETTINGS_HELP_PREFERENCE_KEY)!! .onPreferenceClickListener = Preference.OnPreferenceClickListener { if (firstThrottler.canHandle() is FirstThrottler.CanHandlerResult.Yes) { - openUrlInChromeCustomTab(requireContext(), null, VectorSettingsUrls.HELP) + val intent = VectorWebViewActivity.getIntent(requireContext(), VectorSettingsUrls.HELP, getString(R.string.preference_help)) + startActivity(intent) } false }