aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-07-02 16:54:37 -0700
committerAllan Wang <me@allanwang.ca>2019-07-02 16:54:37 -0700
commit64fd7736ebad421342731553c436092bb16a2f48 (patch)
treee8cc6514517a86f0e53661f7caeedd05c1ec829e /app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
parent4c551386b100ea4b694c1e8f44596ba369e6b068 (diff)
downloadfrost-64fd7736ebad421342731553c436092bb16a2f48.tar.gz
frost-64fd7736ebad421342731553c436092bb16a2f48.tar.bz2
frost-64fd7736ebad421342731553c436092bb16a2f48.zip
Support horizontal swipes for overlays
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.kt2
1 files changed, 2 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 d75a4f1f..376257d4 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
@@ -19,6 +19,7 @@ package com.pitchedapps.frost.web
import android.content.Context
import android.webkit.JavascriptInterface
import com.pitchedapps.frost.activities.MainActivity
+import com.pitchedapps.frost.activities.WebOverlayActivityBase
import com.pitchedapps.frost.contracts.MainActivityContract
import com.pitchedapps.frost.contracts.VideoViewHolder
import com.pitchedapps.frost.db.CookieEntity
@@ -144,5 +145,6 @@ class FrostJSI(val web: FrostWebView) {
@JavascriptInterface
fun allowHorizontalScrolling(enable: Boolean) {
activity?.viewPager?.enableSwipe = enable
+ (context as? WebOverlayActivityBase)?.swipeBack?.disallowIntercept = !enable
}
}