-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #494: Add flag to control gesture continuity #599
Issue #494: Add flag to control gesture continuity #599
Conversation
…eated as a new operation or simply discarded
@@ -6,16 +6,24 @@ import com.bumble.appyx.interactions.core.ui.math.proportionOf | |||
|
|||
open class Gesture<InteractionTarget, ModelState> internal constructor( | |||
val operation: Operation<ModelState>, | |||
val isContinuous: Boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think if we moved it to GestureFactory
? That way it wouldn't need to be specified per every gesture. The cases we have so far are either all of them are continuous or all of them are not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the current option gives more control, however your suggestion is simpler to use, I would choose the existing one, but it's your call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be a combination:
GestureFactory
provides the defaultGesture
falls back to factory default but allows overriding if you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming based on the cases so far that it's either/or for the whole of it, so if it's only one choice I'd go with factory-level definition for its ease.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll update to only use on the factory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zsoltk done!
Issue
Description
Added
isContinuous
Boolean flag toGesture
. This is set totrue
by default. However in cases where a new gesture being created with the remaining offset isn't desirable this can be set to false.Check list
CHANGELOG.md
if required.