aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt10
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt2
2 files changed, 4 insertions, 8 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
index f12212ed..709ab7ac 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
@@ -2,9 +2,7 @@ package com.pitchedapps.frost.web
import android.content.Context
import android.graphics.Bitmap
-import android.view.KeyEvent
import android.webkit.WebResourceRequest
-import android.webkit.WebResourceResponse
import android.webkit.WebView
import android.webkit.WebViewClient
import com.pitchedapps.frost.LoginActivity
@@ -52,8 +50,8 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : WebViewClient() {
}
view.jsInject(JsActions.LOGIN_CHECK,
CssAssets.ROUND_ICONS.maybe(Prefs.showRoundedIcons),
- CssHider.PEOPLE_YOU_MAY_KNOW.maybe(!Prefs.showSuggestedFriends),
- CssHider.ADS.maybe(!Prefs.showFacebookAds),
+ CssHider.PEOPLE_YOU_MAY_KNOW.maybe(!Prefs.showSuggestedFriends && Prefs.pro),
+ CssHider.ADS.maybe(!Prefs.showFacebookAds && Prefs.pro),
JsAssets.HEADER_BADGES.maybe(webCore.baseEnum != null))
onPageFinishedActions(url)
}
@@ -67,9 +65,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : WebViewClient() {
webCore.jsInject(CssHider.HEADER,
Prefs.themeInjector,
JsAssets.CLICK_A.maybe(webCore.baseEnum != null),
- callback = {
- refreshObservable.onNext(false)
- })
+ callback = { refreshObservable.onNext(false) })
}
open fun handleHtml(html: String) {
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
index b953e092..c2a53837 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
@@ -44,7 +44,7 @@ class FrostWebViewCore @JvmOverloads constructor(
var baseUrl: String? = null
- var baseEnum: FbTab? = null
+ var baseEnum: FbTab? = null //only viewpager items should pass the base enum
internal var frostWebClient: FrostWebViewClient? = null
init {