fix #656, prepend website with https if needed

This commit is contained in:
tibbi 2021-02-14 10:04:03 +01:00
parent 49241363a1
commit b1f2316792
1 changed files with 7 additions and 1 deletions

View File

@ -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 {