mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-09 20:42:34 +01:00
Remove laziness in blankResource
This commit is contained in:
parent
355d8ae268
commit
749ebe31d0
@ -175,6 +175,7 @@ abstract class FrostContentViewBase(
|
|||||||
}
|
}
|
||||||
|
|
||||||
refreshChannel.subscribeDuringJob(scope, ContextHelper.coroutineContext) { r ->
|
refreshChannel.subscribeDuringJob(scope, ContextHelper.coroutineContext) { r ->
|
||||||
|
L.v { "Refreshing $r" }
|
||||||
refresh.isRefreshing = r
|
refresh.isRefreshing = r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,13 +30,12 @@ import java.io.ByteArrayInputStream
|
|||||||
* Handler to decide when a request should be done by us
|
* Handler to decide when a request should be done by us
|
||||||
* This is the crux of Frost's optimizations for the web browser
|
* This is the crux of Frost's optimizations for the web browser
|
||||||
*/
|
*/
|
||||||
private val blankResource: WebResourceResponse by lazy {
|
private val blankResource: WebResourceResponse =
|
||||||
WebResourceResponse(
|
WebResourceResponse(
|
||||||
"text/plain",
|
"text/plain",
|
||||||
"utf-8",
|
"utf-8",
|
||||||
ByteArrayInputStream("".toByteArray())
|
ByteArrayInputStream("".toByteArray())
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
fun WebView.shouldFrostInterceptRequest(request: WebResourceRequest): WebResourceResponse? {
|
fun WebView.shouldFrostInterceptRequest(request: WebResourceRequest): WebResourceResponse? {
|
||||||
val requestUrl = request.url?.toString() ?: return null
|
val requestUrl = request.url?.toString() ?: return null
|
||||||
|
Loading…
Reference in New Issue
Block a user