aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-11-07 21:16:07 -0800
committerGitHub <noreply@github.com>2020-11-07 21:16:07 -0800
commita6add7ed6b6a58971c5a439b81d6527d3ee196b9 (patch)
tree6de6bbd1da40fad926a15c12958e5ec808ec2367 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
parent8cac4ce54358f23a30a762bbb960309914507bb8 (diff)
parentbe1132c6df6ca1a664bc557dd02094b36195cc76 (diff)
downloadfrost-a6add7ed6b6a58971c5a439b81d6527d3ee196b9.tar.gz
frost-a6add7ed6b6a58971c5a439b81d6527d3ee196b9.tar.bz2
frost-a6add7ed6b6a58971c5a439b81d6527d3ee196b9.zip
Merge pull request #1729 from AllanWang/feature-scrolling-aware
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.kt11
1 files changed, 11 insertions, 0 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 e17ef99e..40a048af 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
@@ -161,4 +161,15 @@ class FrostJSI(val web: FrostWebView) {
activity?.contentBinding?.viewpager?.enableSwipe = enable
(context as? WebOverlayActivityBase)?.swipeBack?.disallowIntercept = !enable
}
+
+ private var isScrolling = false
+
+ @JavascriptInterface
+ fun setScrolling(scrolling: Boolean) {
+ L.v { "Scrolling $scrolling" }
+ this.isScrolling = scrolling
+ }
+
+ @JavascriptInterface
+ fun isScrolling(): Boolean = isScrolling
}