Skip to content

Commit 6a80dbf

Browse files
DavidMina96David MinaAli Abdelfattah
authored
[MOB-8630] Fix a typo in swipe invocation in Android bridge (#690)
* Fix a typo in swipe invocation in Android bridge * Update CHANGELOG.md Co-authored-by: David Mina <[email protected]> Co-authored-by: Ali Abdelfattah <[email protected]>
1 parent a063f82 commit 6a80dbf

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## master
22

33
* Adds dynamic entry file support
4+
* Fixes an issue with swipe invocation event not working on Android
45

56
## 10.13.0 (2022-03-17)
67

android/src/main/java/com/instabug/reactlibrary/ArgsRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static Object getRawValue(String key) {
111111
}
112112

113113
static void registerInstabugInvocationEventsArgs(Map<String, Object> args) {
114-
args.put("invocationEventTwoFingersSwipe", TWO_FINGER_SWIPE_LEFT);
114+
args.put("invocationEventTwoFingersSwipeLeft", TWO_FINGER_SWIPE_LEFT);
115115
args.put("invocationEventFloatingButton", FLOATING_BUTTON);
116116
args.put("invocationEventScreenshot", SCREENSHOT);
117117
args.put("invocationEventShake", SHAKE);

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
9898
private final String INVOCATION_EVENT_NONE = "invocationEventNone";
9999
private final String INVOCATION_EVENT_SHAKE = "invocationEventShake";
100100
private final String INVOCATION_EVENT_SCREENSHOT = "invocationEventScreenshot";
101-
private final String INVOCATION_EVENT_TWO_FINGERS_SWIPE = "invocationEventTwoFingersSwipe";
101+
private final String INVOCATION_EVENT_TWO_FINGERS_SWIPE_LEFT = "invocationEventTwoFingersSwipeLeft";
102102
private final String INVOCATION_EVENT_FLOATING_BUTTON = "invocationEventFloatingButton";
103103
//InvocationModes
104104
private final String INVOCATION_MODE_NA = "na";
@@ -776,7 +776,7 @@ public void setInvocationEvents(ReadableArray invocationEventValues) {
776776
case INVOCATION_EVENT_FLOATING_BUTTON:
777777
parsedInvocationEvents.add(InstabugInvocationEvent.FLOATING_BUTTON);
778778
break;
779-
case INVOCATION_EVENT_TWO_FINGERS_SWIPE:
779+
case INVOCATION_EVENT_TWO_FINGERS_SWIPE_LEFT:
780780
parsedInvocationEvents.add(InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT);
781781
break;
782782
case INVOCATION_EVENT_SHAKE:
@@ -813,7 +813,7 @@ private InstabugInvocationEvent getInvocationEventById(String invocationEventVal
813813
try {
814814
if (invocationEventValue.equals(INVOCATION_EVENT_FLOATING_BUTTON)) {
815815
invocationEvent = InstabugInvocationEvent.FLOATING_BUTTON;
816-
} else if (invocationEventValue.equals(INVOCATION_EVENT_TWO_FINGERS_SWIPE)) {
816+
} else if (invocationEventValue.equals(INVOCATION_EVENT_TWO_FINGERS_SWIPE_LEFT)) {
817817
invocationEvent = InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT;
818818
} else if (invocationEventValue.equals(INVOCATION_EVENT_SHAKE)) {
819819
invocationEvent = InstabugInvocationEvent.SHAKE;
@@ -2421,7 +2421,7 @@ public Map<String, Object> getConstants() {
24212421
constants.put("invocationEventNone", INVOCATION_EVENT_NONE);
24222422
constants.put("invocationEventShake", INVOCATION_EVENT_SHAKE);
24232423
constants.put("invocationEventScreenshot", INVOCATION_EVENT_SCREENSHOT);
2424-
constants.put("invocationEventTwoFingersSwipe", INVOCATION_EVENT_TWO_FINGERS_SWIPE);
2424+
constants.put("invocationEventTwoFingersSwipeLeft", INVOCATION_EVENT_TWO_FINGERS_SWIPE_LEFT);
24252425
constants.put("invocationEventFloatingButton", INVOCATION_EVENT_FLOATING_BUTTON);
24262426

24272427
constants.put("colorThemeLight", COLOR_THEME_LIGHT);

0 commit comments

Comments
 (0)