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-12 23:07:02 -0800
committerAllan Wang <me@allanwang.ca>2021-01-12 23:07:02 -0800
commit5aec10ce0fe191d78399869074c7e118256848ea (patch)
treeaff3d79f003ef1200a36b810a336d6947e69114d /app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt
parentce9e44a742638eaaad5833f39d394535ddfd67a2 (diff)
downloadfrost-5aec10ce0fe191d78399869074c7e118256848ea.tar.gz
frost-5aec10ce0fe191d78399869074c7e118256848ea.tar.bz2
frost-5aec10ce0fe191d78399869074c7e118256848ea.zip
Fix swipe disable logic and disable for 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