Nine: Remove timeout (#1229)

* Bump version

* Remove timeout from webview
This commit is contained in:
Samfun75
2023-02-02 02:22:11 +03:00
committed by GitHub
parent 0b574a910f
commit b09927eed9
2 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = '9anime'
pkgNameSuffix = 'en.nineanime'
extClass = '.NineAnime'
extVersionCode = 28
extVersionCode = 29
libVersion = '13'
}

View File

@ -18,7 +18,6 @@ import okhttp3.Response
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
class JsInterceptor(private val lang: String) : Interceptor {
@ -37,7 +36,7 @@ class JsInterceptor(private val lang: String) : Interceptor {
handler.post {
context.let { Toast.makeText(it, "This might take a while, Don't close me", Toast.LENGTH_LONG).show() }
}
val newRequest = resolveWithWebView(originalRequest) ?: throw Exception("Someting went wrong or took too long")
val newRequest = resolveWithWebView(originalRequest) ?: throw Exception("Someting went wrong")
return chain.proceed(newRequest)
}
@ -111,7 +110,7 @@ class JsInterceptor(private val lang: String) : Interceptor {
}
}
latch.await(30, TimeUnit.SECONDS)
latch.await()
handler.post {
webView?.stopLoading()