aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-02-16 21:51:02 -0500
committerGitHub <noreply@github.com>2018-02-16 21:51:02 -0500
commitfec23276e8290d4600ef79c54b5fcb00673daa83 (patch)
treec1e7710e91b4152bf40f736294aef12a635535b2 /app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt
parentd68ea6d7eb8cadf687308fa3204386b79df0556b (diff)
downloadfrost-fec23276e8290d4600ef79c54b5fcb00673daa83.tar.gz
frost-fec23276e8290d4600ef79c54b5fcb00673daa83.tar.bz2
frost-fec23276e8290d4600ef79c54b5fcb00673daa83.zip
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
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt13
1 files changed, 5 insertions, 8 deletions
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 43653382..4622971b 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt
@@ -12,7 +12,6 @@ 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.facebook.WEB_LOAD_DELAY
import com.pitchedapps.frost.utils.L
@@ -59,14 +58,12 @@ abstract class FrostContentView<out T> @JvmOverloads constructor(
protected abstract val layoutRes: Int
- override var swipeEnabled: Boolean
- get() = refresh.isEnabled
+ override var swipeEnabled = true
set(value) {
- refresh.isEnabled = value
- if (!value) {
- // locked onto an input field; ensure content is visible
- (context as? MainActivityContract)?.collapseAppBar()
- }
+ if (field == value)
+ return
+ field = value
+ refresh.post { refresh.isEnabled = value }
}
/**