aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-12-27 00:28:33 -0800
committerAllan Wang <me@allanwang.ca>2019-12-27 00:28:33 -0800
commit44524ce6eea7b0d0998bbabc8d72ea8b43f55f02 (patch)
treebbcdc7a3d3c54048f838635280ac0d1a3f341133 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
parent454872d712a0496e97b7138b30cc2fccac037b2f (diff)
downloadfrost-44524ce6eea7b0d0998bbabc8d72ea8b43f55f02.tar.gz
frost-44524ce6eea7b0d0998bbabc8d72ea8b43f55f02.tar.bz2
frost-44524ce6eea7b0d0998bbabc8d72ea8b43f55f02.zip
Add nav items programmatically
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.kt4
1 files changed, 2 insertions, 2 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 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
}
}