From 5aec10ce0fe191d78399869074c7e118256848ea Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Tue, 12 Jan 2021 23:07:02 -0800 Subject: Fix swipe disable logic and disable for messenger --- .../com/pitchedapps/frost/contracts/FrostContentContract.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt') 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 -- cgit v1.2.3