diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-07 03:26:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-07 03:26:55 -0400 |
commit | 6adfc496374eb88919f70a240eb15a726d2c18e0 (patch) | |
tree | 7cba34515bde7d840d37c50c397e948407776cc9 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | |
parent | bb70ed737d98abbd6164b66ac5bd667553b312bd (diff) | |
download | frost-6adfc496374eb88919f70a240eb15a726d2c18e0.tar.gz frost-6adfc496374eb88919f70a240eb15a726d2c18e0.tar.bz2 frost-6adfc496374eb88919f70a240eb15a726d2c18e0.zip |
Dev 1.1.6 (#33) - Fix play store listing, add sharing options, update css & jsv1.1.6
* Remove play store listing updates
* Fix up listing
* Combine url getters for overlay activity
* Begin building context menu programmatically
* Update css and js
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt index 89f7d20b..68163333 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -4,17 +4,14 @@ import android.content.Context import android.webkit.JavascriptInterface import com.pitchedapps.frost.MainActivity import com.pitchedapps.frost.dbflow.CookieModel -import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.cookies -import com.pitchedapps.frost.utils.launchLogin -import com.pitchedapps.frost.utils.launchWebOverlay +import com.pitchedapps.frost.utils.* import io.reactivex.subjects.Subject /** * Created by Allan Wang on 2017-06-01. */ -class FrostJSI(val context: Context, val webView: FrostWebViewCore) { +class FrostJSI(val context: Context, val webView: FrostWebViewCore, val contextMenu: FrostWebContextMenu) { val headerObservable: Subject<String>? = (context as? MainActivity)?.headerBadgeObservable @@ -36,6 +33,11 @@ class FrostJSI(val context: Context, val webView: FrostWebViewCore) { } @JavascriptInterface + fun contextMenu(url: String) { + contextMenu.post { contextMenu.show(url) } + } + + @JavascriptInterface fun loadLogin() { context.launchLogin(cookies, true) } |