messages: open web links in full web browser
In [1], all hyperlinks within `MessagesNode` switched to using
activity.openUrlInChromeCustomTab()
instead of with `openUrlInExternalApp()`.
This causes web links in chat messages to open in an "in-app"
Chrome Custom Tab [2] instead of the user's configured "full"
web browser. This is a UX nuisance. Open web links in a full
browser instead.
Closes #3885 [3].
[1]: 5baefd479f (Identity change: handle click on "learn more")
[2]: https://developer.chrome.com/docs/android/custom-tabs/guide-get-started#opening_a_custom_tab
[3]: https://github.com/element-hq/element-x-android/issues/3885
This commit is contained in:
parent
3668e861f7
commit
31c3b0c881
1 changed files with 4 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ import io.element.android.features.messages.impl.timeline.di.LocalTimelineItemPr
|
|||
import io.element.android.features.messages.impl.timeline.di.TimelineItemPresenterFactories
|
||||
import io.element.android.features.messages.impl.timeline.model.TimelineItem
|
||||
import io.element.android.libraries.androidutils.browser.openUrlInChromeCustomTab
|
||||
import io.element.android.libraries.androidutils.system.openUrlInExternalApp
|
||||
import io.element.android.libraries.androidutils.system.toast
|
||||
import io.element.android.libraries.architecture.NodeInputs
|
||||
import io.element.android.libraries.architecture.inputs
|
||||
|
|
@ -148,7 +149,9 @@ class MessagesNode @AssistedInject constructor(
|
|||
is PermalinkData.RoomLink -> {
|
||||
handleRoomLinkClick(activity, permalink, eventSink)
|
||||
}
|
||||
is PermalinkData.FallbackLink,
|
||||
is PermalinkData.FallbackLink -> {
|
||||
activity.openUrlInExternalApp(url)
|
||||
}
|
||||
is PermalinkData.RoomEmailInviteLink -> {
|
||||
activity.openUrlInChromeCustomTab(null, darkTheme, url)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue