diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-04 03:28:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 03:28:52 -0400 |
commit | 7a13673828f088c179763e8621a94e334319f226 (patch) | |
tree | 4fb055ac8e180d7ce0eb4a9e3c88dc6230ff8187 /app/src/main/kotlin/com/pitchedapps/frost/web | |
parent | caf3c4187706ba436fad5e3fa4fd1476a9a4e3ee (diff) | |
download | frost-7a13673828f088c179763e8621a94e334319f226.tar.gz frost-7a13673828f088c179763e8621a94e334319f226.tar.bz2 frost-7a13673828f088c179763e8621a94e334319f226.zip |
Misc fixes
* Remove experimental by default
* Update theme
* Update glide caching to reload with every version
* Pause hidden searchview when not in use
* Convert glide to glide app
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt | 11 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt index 10499bfa..00e72cc7 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt @@ -1,10 +1,7 @@ package com.pitchedapps.frost.web import android.net.Uri -import android.webkit.ConsoleMessage -import android.webkit.ValueCallback -import android.webkit.WebChromeClient -import android.webkit.WebView +import android.webkit.* import com.pitchedapps.frost.utils.L import io.reactivex.subjects.BehaviorSubject import io.reactivex.subjects.Subject @@ -36,7 +33,7 @@ class FrostChromeClient(webCore: FrostWebViewCore) : WebChromeClient() { override fun onShowFileChooser(webView: WebView, filePathCallback: ValueCallback<Array<Uri>>?, fileChooserParams: FileChooserParams?): Boolean { L.d("On show file chooser") fileChooserParams?.apply { - L.d(filenameHint) + L.d(filenameHint ?: "hi") L.d("$mode") L.d(acceptTypes.contentToString()) } @@ -44,6 +41,10 @@ class FrostChromeClient(webCore: FrostWebViewCore) : WebChromeClient() { return super.onShowFileChooser(webView, filePathCallback, fileChooserParams) } + override fun onGeolocationPermissionsShowPrompt(origin: String, callback: GeolocationPermissions.Callback) { + super.onGeolocationPermissionsShowPrompt(origin, callback) + L.d("Geo prompt") + } }
\ No newline at end of file diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt index 837df260..83dccb9a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt @@ -127,6 +127,7 @@ class FrostWebViewSearch(context: Context, val contract: SearchContract) : WebVi when (flag) { 0 -> { L.d("Search loaded successfully") + if (!contract.isSearchOpened) pauseLoad = true } 1 -> { //something is not found in the search view; this is effectively useless L.eThrow("Search subject error; reverting to full overlay") @@ -147,6 +148,7 @@ class FrostWebViewSearch(context: Context, val contract: SearchContract) : WebVi interface SearchContract { fun searchOverlayDispose() fun emitSearchResponse(items: List<SearchItem>) + val isSearchOpened: Boolean } } |