aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-09-28 23:06:34 -0700
committerAllan Wang <me@allanwang.ca>2021-09-28 23:06:34 -0700
commit749ebe31d0d23d7097a7c989a8324714aa28d996 (patch)
tree4335658a8313fd5fbb7716c8e5fcf447a11fb4ab /app
parent355d8ae26840d7c00faed2b9b1188b43c2a68377 (diff)
downloadfrost-749ebe31d0d23d7097a7c989a8324714aa28d996.tar.gz
frost-749ebe31d0d23d7097a7c989a8324714aa28d996.tar.bz2
frost-749ebe31d0d23d7097a7c989a8324714aa28d996.zip
Remove laziness in blankResource
Diffstat (limited to 'app')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt1
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt3
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt
index 124a75df..c30ee199 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt
@@ -175,6 +175,7 @@ abstract class FrostContentViewBase(
}
refreshChannel.subscribeDuringJob(scope, ContextHelper.coroutineContext) { r ->
+ L.v { "Refreshing $r" }
refresh.isRefreshing = r
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt
index 5586d479..defdcae1 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostRequestInterceptor.kt
@@ -30,13 +30,12 @@ import java.io.ByteArrayInputStream
* Handler to decide when a request should be done by us
* This is the crux of Frost's optimizations for the web browser
*/
-private val blankResource: WebResourceResponse by lazy {
+private val blankResource: WebResourceResponse =
WebResourceResponse(
"text/plain",
"utf-8",
ByteArrayInputStream("".toByteArray())
)
-}
fun WebView.shouldFrostInterceptRequest(request: WebResourceRequest): WebResourceResponse? {
val requestUrl = request.url?.toString() ?: return null