mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
splitting url detection condition into separate branches
This commit is contained in:
parent
913c6b0f14
commit
e6198d7bf6
1 changed files with 5 additions and 2 deletions
|
@ -1926,10 +1926,13 @@ class TimelineFragment @Inject constructor(
|
|||
})
|
||||
if (!isManaged) {
|
||||
when {
|
||||
url.containsRtLOverride() || (title.isValidUrl() && url.isValidUrl() && URL(title).host != URL(url).host) -> {
|
||||
url.containsRtLOverride() -> {
|
||||
displayUrlConfirmationDialog(title.ensureEndsLeftToRight(), url.filterDirectionOverrides())
|
||||
}
|
||||
else -> {
|
||||
title.isValidUrl() && url.isValidUrl() && URL(title).host != URL(url).host -> {
|
||||
displayUrlConfirmationDialog(title.ensureEndsLeftToRight(), url)
|
||||
}
|
||||
else -> {
|
||||
openUrlInExternalBrowser(requireContext(), url)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue