From f35a33b5c49c4dc768c1be8ddf3393f79acaa57f Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 7 Nov 2020 20:19:22 -0800 Subject: Disable context menu shortly after scrolling --- app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt') 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..d4a07ea2 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.i { "Scrolling $scrolling" } + this.isScrolling = scrolling + } + + @JavascriptInterface + fun isScrolling(): Boolean = isScrolling } -- cgit v1.2.3