From fec23276e8290d4600ef79c54b5fcb00673daa83 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 16 Feb 2018 21:51:02 -0500 Subject: Update/misc (#728) * Update basic agent check; fixes #714 * Disable swipe on long click * Remove duplicate code * Update dependencies * Update dependencies 2 * Add debug keystore * Update versions * Fix duplicate notification * Fix duplicate notification sound; addreesses #725 * Update changelog * Clean up --- app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (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 4a3fa2a2..564b0e04 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -2,6 +2,7 @@ package com.pitchedapps.frost.web import android.webkit.JavascriptInterface import com.pitchedapps.frost.activities.MainActivity +import com.pitchedapps.frost.contracts.MainActivityContract import com.pitchedapps.frost.contracts.VideoViewHolder import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.utils.* @@ -63,6 +64,7 @@ class FrostJSI(val web: FrostWebView) { @JavascriptInterface fun longClick(start: Boolean) { activity?.viewPager?.enableSwipe = !start + web.parent.swipeEnabled = !start } /** @@ -70,7 +72,11 @@ class FrostJSI(val web: FrostWebView) { */ @JavascriptInterface fun disableSwipeRefresh(disable: Boolean) { - web.post { web.parent.swipeEnabled = !disable } + web.parent.swipeEnabled = !disable + if (disable) { + // locked onto an input field; ensure content is visible + (context as? MainActivityContract)?.collapseAppBar() + } } @JavascriptInterface -- cgit v1.2.3