mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-17 12:00:39 +01:00
fix #656, prepend website with https if needed
This commit is contained in:
parent
49241363a1
commit
b1f2316792
@ -80,8 +80,14 @@ fun Context.sendAddressIntent(address: String) {
|
||||
}
|
||||
|
||||
fun Context.openWebsiteIntent(url: String) {
|
||||
val website = if (url.startsWith("http")) {
|
||||
url
|
||||
} else {
|
||||
"https://$url"
|
||||
}
|
||||
|
||||
Intent(Intent.ACTION_VIEW).apply {
|
||||
data = Uri.parse(url)
|
||||
data = Uri.parse(website)
|
||||
if (resolveActivity(packageManager) != null) {
|
||||
startActivity(this)
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user