aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt1
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt14
2 files changed, 8 insertions, 7 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 8335be7f..a961972f 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
@@ -71,6 +71,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : BaseWebViewClient
view.jsInject(
CssAssets.ROUND_ICONS.maybe(Prefs.showRoundedIcons),
CssHider.HEADER,
+ CssHider.CORE,
CssHider.PEOPLE_YOU_MAY_KNOW.maybe(!Prefs.showSuggestedFriends && IS_FROST_PRO),
Prefs.themeInjector,
CssHider.NON_RECENT.maybe(webCore.url?.contains("?sk=h_chr") ?: false))
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt
index 51dc2e99..d188d629 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt
@@ -2,6 +2,7 @@ package com.pitchedapps.frost.web
import android.annotation.SuppressLint
import android.content.Context
+import android.graphics.Color
import android.util.AttributeSet
import android.view.View
import android.webkit.*
@@ -56,12 +57,7 @@ class LoginWebView @JvmOverloads constructor(
override fun onPageFinished(view: WebView, url: String?) {
super.onPageFinished(view, url)
checkForLogin(url) { id, cookie -> loginCallback(CookieModel(id, "", cookie)) }
- if (url.isFacebookUrl)
- view.jsInject(CssHider.HEADER,
- CssHider.CORE,
- Prefs.themeInjector,
- callback = { if (!view.isVisible) view.fadeIn(offset = WEB_LOAD_DELAY) })
- else if (!view.isVisible) view.fadeIn()
+ if (!view.isVisible) view.fadeIn()
}
fun checkForLogin(url: String?, onFound: (id: Long, cookie: String) -> Unit) {
@@ -76,7 +72,11 @@ class LoginWebView @JvmOverloads constructor(
override fun onPageCommitVisible(view: WebView, url: String?) {
super.onPageCommitVisible(view, url)
- view.setBackgroundColor(Prefs.bgColor)
+ view.setBackgroundColor(Color.TRANSPARENT)
+ if (url.isFacebookUrl)
+ view.jsInject(CssHider.HEADER,
+ CssHider.CORE,
+ Prefs.themeInjector)
}
override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean {