From f1e1aec8487fd148eb8e75fe016a8438958989ad Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 21 Dec 2017 20:55:51 -0500 Subject: misc (#566) * Fix click validator * Update tests * Feature/fb requests (#567) * Add initial requesting interface * Update unit tests and dependencies * Resolve lint * Fix lint 2 * Fix toolbar location, closes #439 * Add prev version code, closes #551 * Clear test val * Update changelog --- .../kotlin/com/pitchedapps/frost/views/FrostContentView.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt index 58449de3..809b6090 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt @@ -12,6 +12,7 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.contracts.FrostContentContainer import com.pitchedapps.frost.contracts.FrostContentCore import com.pitchedapps.frost.contracts.FrostContentParent +import com.pitchedapps.frost.contracts.MainActivityContract import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.web.WEB_LOAD_DELAY @@ -57,6 +58,16 @@ abstract class FrostContentView @JvmOverloads constructor( protected abstract val layoutRes: Int + override var swipeEnabled: Boolean + get() = refresh.isEnabled + set(value) { + refresh.isEnabled = value + if (!value) { + // locked onto an input field; ensure content is visible + (context as? MainActivityContract)?.collapseAppBar() + } + } + /** * Sets up everything * Called by [bind] -- cgit v1.2.3