Skip to content

Commit

Permalink
refactor(android): move default value to convenient constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
asafkorem committed May 8, 2024
1 parent 21c5aaf commit bffb819
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class RNClickAction implements ViewAction {
private final GeneralClickAction clickAction;

public RNClickAction() {
this(null);
this(GeneralLocation.VISIBLE_CENTER);
}

public RNClickAction(CoordinatesProvider coordinatesProvider) {
Expand All @@ -31,7 +31,7 @@ public RNClickAction(CoordinatesProvider coordinatesProvider) {
public RNClickAction(CoordinatesProvider coordinatesProvider, Long duration) {
clickAction = new GeneralClickAction(
new DetoxSingleTap(duration),
coordinatesProvider != null ? coordinatesProvider : GeneralLocation.VISIBLE_CENTER,
coordinatesProvider,
Press.FINGER,
InputDevice.SOURCE_UNKNOWN,
MotionEvent.BUTTON_PRIMARY
Expand Down

0 comments on commit bffb819

Please sign in to comment.