Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening FAQ in app #1058

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/906.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ouverture de l'aide dans l'application au lieu du navigateur.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -54,7 +55,8 @@ class VectorSettingsRootFragment :
findPreference<VectorPreference>(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
}
Expand Down
Loading