aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-01-24 22:04:37 -0800
committerGitHub <noreply@github.com>2021-01-24 22:04:37 -0800
commit94aa2dd8125f474570f366408645e5a81236c573 (patch)
tree2952e3ca17872ef10545081a100f16b720f0072a /app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt
parent68db99597b68c87f1e0eb2d1feb6b6c63bbff1e9 (diff)
parent35adc9529f1466e3ae45ee1934536f696bc24547 (diff)
downloadfrost-94aa2dd8125f474570f366408645e5a81236c573.tar.gz
frost-94aa2dd8125f474570f366408645e5a81236c573.tar.bz2
frost-94aa2dd8125f474570f366408645e5a81236c573.zip
Merge pull request #1742 from AllanWang/messenger
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt b/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt
index 8a6e57af..b8d0d86f 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt
@@ -73,11 +73,17 @@ interface FrostContentParent : DynamicUiContract {
var baseEnum: FbItem?
+ val swipeEnabled: Boolean get() = swipeAllowedByPage && !swipeDisabledByAction
+
+ /**
+ * Temporary disable swiping based on action
+ */
+ var swipeDisabledByAction: Boolean
+
/**
- * Toggle state for allowing swipes
- * Allowed on any thread
+ * Decides if swipe should be allowed for the current page
*/
- var swipeEnabled: Boolean
+ var swipeAllowedByPage: Boolean
/**
* Binds the container to self