aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-11-23 18:29:05 -0800
committerGitHub <noreply@github.com>2021-11-23 18:29:05 -0800
commit120ad1520db9184ebfa00885066e06a9f976e5f6 (patch)
tree50835fa79cf15ff348be386c46cea0a05552ba74 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
parente246b35323e27dd18fa48910e5ca95669b53f8b0 (diff)
parentdb646e23ce0047461e68be1af7021ce6171ac850 (diff)
downloadfrost-120ad1520db9184ebfa00885066e06a9f976e5f6.tar.gz
frost-120ad1520db9184ebfa00885066e06a9f976e5f6.tar.bz2
frost-120ad1520db9184ebfa00885066e06a9f976e5f6.zip
Merge pull request #1857 from AllanWang/flows
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.kt14
1 files changed, 7 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 3b332199..ba19989d 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
@@ -53,7 +53,6 @@ import com.pitchedapps.frost.utils.isMessengerUrl
import com.pitchedapps.frost.utils.launchImageActivity
import com.pitchedapps.frost.utils.startActivityForUri
import com.pitchedapps.frost.views.FrostWebView
-import kotlinx.coroutines.channels.SendChannel
import kotlinx.coroutines.launch
/**
@@ -83,7 +82,7 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
protected val fbCookie: FbCookie get() = web.fbCookie
protected val prefs: Prefs get() = web.prefs
protected val themeProvider: ThemeProvider get() = web.themeProvider
- protected val refresh: SendChannel<Boolean> = web.parent.refreshChannel
+// protected val refresh: SendChannel<Boolean> = web.parent.refreshChannel
protected val isMain = web.parent.baseEnum != null
/**
@@ -156,7 +155,7 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
super.onPageStarted(view, url, favicon)
if (url == null) return
v { "loading $url ${web.settings.userAgentString}" }
- refresh.offer(true)
+// refresh.offer(true)
}
private fun injectBackgroundColor() {
@@ -182,7 +181,7 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
view.messengerJsInject()
}
else -> {
- refresh.offer(false)
+// refresh.offer(false)
}
}
}
@@ -191,7 +190,7 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
url ?: return
v { "finished $url" }
if (!url.isFacebookUrl && !url.isMessengerUrl) {
- refresh.offer(false)
+// refresh.offer(false)
return
}
onPageFinishedActions(url)
@@ -204,9 +203,10 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
injectAndFinish()
}
- internal fun injectAndFinish() {
+ // Temp open
+ internal open fun injectAndFinish() {
v { "page finished reveal" }
- refresh.offer(false)
+// refresh.offer(false)
injectBackgroundColor()
when {
web.url.isFacebookUrl -> {