diff options
author | Allan Wang <me@allanwang.ca> | 2017-09-24 16:39:26 -0400 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-09-24 16:39:26 -0400 |
commit | 38d7b144cdf96f7e079a38ace7f9ece25694592d (patch) | |
tree | 0b88644f3bfacc0ae882c2dd1551e09623a0cd18 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt | |
parent | b2967e539e21e3f3e57f7848a397c9f94ef6a54d (diff) | |
parent | 251e697e8e3a17370359273c5fcf7cc2a9f33912 (diff) | |
download | frost-38d7b144cdf96f7e079a38ace7f9ece25694592d.tar.gz frost-38d7b144cdf96f7e079a38ace7f9ece25694592d.tar.bz2 frost-38d7b144cdf96f7e079a38ace7f9ece25694592d.zip |
Merge
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.kt | 12 |
1 files changed, 9 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 c398469c..31aaaa6f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt @@ -50,7 +50,6 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : BaseWebViewClient refreshObservable.onNext(true) } - fun launchLogin(c: Context) { if (c is MainActivity && c.cookies().isNotEmpty()) c.launchNewTask(SelectorActivity::class.java, c.cookies()) @@ -58,8 +57,15 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : BaseWebViewClient c.launchNewTask(LoginActivity::class.java) } - private fun injectBackgroundColor() - = webCore.setBackgroundColor(if (isMain) Color.TRANSPARENT else Prefs.bgColor.withAlpha(255)) + private fun injectBackgroundColor() { + webCore.setBackgroundColor( + when { + isMain -> Color.TRANSPARENT + webCore.url.isFacebookUrl -> Prefs.bgColor.withAlpha(255) + else -> Color.WHITE + } + ) + } override fun onPageCommitVisible(view: WebView, url: String?) { |