From 44524ce6eea7b0d0998bbabc8d72ea8b43f55f02 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 27 Dec 2019 00:28:33 -0800 Subject: Add nav items programmatically --- app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 0988e331..c8e551a3 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -88,7 +88,7 @@ class FrostJSI(val web: FrostWebView) { */ @JavascriptInterface fun longClick(start: Boolean) { - activity?.viewPager?.enableSwipe = !start + activity?.contentBinding?.viewpager?.enableSwipe = !start if (web.frostWebClient.urlSupportsRefresh) { web.parent.swipeEnabled = !start } @@ -151,7 +151,7 @@ class FrostJSI(val web: FrostWebView) { @JavascriptInterface fun allowHorizontalScrolling(enable: Boolean) { - activity?.viewPager?.enableSwipe = enable + activity?.contentBinding?.viewpager?.enableSwipe = enable (context as? WebOverlayActivityBase)?.swipeBack?.disallowIntercept = !enable } } -- cgit v1.2.3