mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
Permalink: move supported hosts to config file
This commit is contained in:
parent
a73f0a9fa8
commit
21d0a28150
2 changed files with 12 additions and 10 deletions
|
@ -63,7 +63,7 @@ class LinkHandlerActivity : VectorBaseActivity<ActivityProgressBinding>() {
|
|||
|
||||
if (uri.getQueryParameter(LoginConfig.CONFIG_HS_PARAMETER) != null) {
|
||||
handleConfigUrl(uri)
|
||||
} else if (SUPPORTED_HOSTS.contains(uri.host)) {
|
||||
} else if (resources.getStringArray(R.array.permalink_supported_hosts).contains(uri.host)) {
|
||||
handleSupportedHostUrl(uri)
|
||||
} else {
|
||||
// Other links are not yet handled, but should not come here (manifest configuration error?)
|
||||
|
@ -175,15 +175,6 @@ class LinkHandlerActivity : VectorBaseActivity<ActivityProgressBinding>() {
|
|||
}
|
||||
|
||||
companion object {
|
||||
private val SUPPORTED_HOSTS = listOf(
|
||||
// Regular Element Web instance
|
||||
"app.element.io",
|
||||
// Other known instances of Element Web
|
||||
"develop.element.io",
|
||||
"staging.element.io",
|
||||
// Previous Web instance, kept for compatibility reason
|
||||
"riot.im"
|
||||
)
|
||||
private val SUPPORTED_PATHS = listOf(
|
||||
"/#/room/",
|
||||
"/#/user/",
|
||||
|
|
|
@ -26,4 +26,15 @@
|
|||
<item>gitter.im</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Permalink config -->
|
||||
<string-array name="permalink_supported_hosts" translatable="false">
|
||||
<!-- Regular Element Web instance -->
|
||||
<item>app.element.io</item>
|
||||
<!-- Other known instances of Element Web -->
|
||||
<item>develop.element.io</item>
|
||||
<item>staging.element.io</item>
|
||||
<!-- Previous Web instance, kept for compatibility reason -->
|
||||
<item>riot.im</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue