splitting url detection condition into separate branches
This commit is contained in:
parent
913c6b0f14
commit
e6198d7bf6
|
@ -1926,10 +1926,13 @@ class TimelineFragment @Inject constructor(
|
||||||
})
|
})
|
||||||
if (!isManaged) {
|
if (!isManaged) {
|
||||||
when {
|
when {
|
||||||
url.containsRtLOverride() || (title.isValidUrl() && url.isValidUrl() && URL(title).host != URL(url).host) -> {
|
url.containsRtLOverride() -> {
|
||||||
displayUrlConfirmationDialog(title.ensureEndsLeftToRight(), url.filterDirectionOverrides())
|
displayUrlConfirmationDialog(title.ensureEndsLeftToRight(), url.filterDirectionOverrides())
|
||||||
}
|
}
|
||||||
else -> {
|
title.isValidUrl() && url.isValidUrl() && URL(title).host != URL(url).host -> {
|
||||||
|
displayUrlConfirmationDialog(title.ensureEndsLeftToRight(), url)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
openUrlInExternalBrowser(requireContext(), url)
|
openUrlInExternalBrowser(requireContext(), url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue