aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-19 20:31:53 -0700
committerAllan Wang <me@allanwang.ca>2017-08-19 20:31:53 -0700
commitbf2168ee57ded706819d1e4f49d729d4f45e1d29 (patch)
treee4bd606ab8fc90fa7f797709227b901fb0e946b4 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
parent86630a1a6bfedfb9c9834c5e1d13c45bd37e18e7 (diff)
downloadfrost-bf2168ee57ded706819d1e4f49d729d4f45e1d29.tar.gz
frost-bf2168ee57ded706819d1e4f49d729d4f45e1d29.tar.bz2
frost-bf2168ee57ded706819d1e4f49d729d4f45e1d29.zip
Fix link issue and add option to use default browser
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
index b1466ee8..22b628e9 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
@@ -48,7 +48,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : BaseWebViewClient
override fun onPageStarted(view: WebView, url: String?, favicon: Bitmap?) {
super.onPageStarted(view, url, favicon)
if (url == null) return
- L.i("FWV Loading", url)
+ L.d("FWV Loading", url)
refreshObservable.onNext(true)
if (!url.isFacebookUrl) return
if (url.contains("logout.php")) FbCookie.logout(Prefs.userId, { launchLogin(view.context) })
@@ -81,7 +81,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : BaseWebViewClient
override fun onPageFinished(view: WebView, url: String?) {
url ?: return
- L.i("Page finished", url)
+ L.d("Page finished", url)
if (!url.isFacebookUrl) {
refreshObservable.onNext(false)
return
@@ -141,7 +141,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : BaseWebViewClient
if (path.startsWith("/composer/")) return launchRequest(request)
if (request.url.toString().contains("scontent-sea1-1.xx.fbcdn.net") && (path.endsWith(".jpg") || path.endsWith(".png")))
return launchImage(request.url.toString())
- if (view.context.resolveActivityForUri(request.url)) return true
+ if (Prefs.linksInDefaultApp && view.context.resolveActivityForUri(request.url)) return true
return super.shouldOverrideUrlLoading(view, request)
}