-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
#102 FIX #772
#102 FIX #772
Conversation
|
performsTouchActions.performMultiTouchAction(this); | ||
} else if (size == 1) { | ||
} else { | ||
//android doesn't like having multi-touch actions with only a single TouchAction... | ||
performsTouchActions.performTouchAction(actions.build().get(0)); |
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.
perhaps touchActions.get(0)
?
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.
yes. Will improve soon
List<TouchAction> touchActions = actions.build(); | ||
checkArgument(touchActions.size() > 0, | ||
"MultiTouch action must have at least one TouchAction added before it can be performed"); | ||
if (touchActions.size() > 1) { | ||
performsTouchActions.performMultiTouchAction(this); |
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.
you can returns this
immediately here, so then else
block is not needed
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.
@mykola-mokhnach
I can't understand how to do it
performsTouchActions.performMultiTouchAction(this);
is void
performsTouchActions.performTouchAction(touchActions.get(0));
returns TouchAction
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.
if (touchActions.size() > 1) {
performsTouchActions.performMultiTouchAction(this);
return this;
}
//android doesn't like having multi-touch actions with only a single TouchAction...
performsTouchActions.performTouchAction(touchActions.get(0));
return this;
touchActions.forEach(action -> { | ||
listOfActionChains.add(action.getParameters().get("actions")); | ||
}); | ||
touchActions.forEach(action -> |
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.
why not to replace it with something like ImmutableList.Builder<Object> listOfActionChains = ImmutableList.copyOf(touchActions.stream().map(x -> x.getParameters().get("actions")));
?
@mykola-mokhnach There is one more change. |
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.
LGTM
Change list
IllegalArgumentException
when no action is defined.#102
Types of changes