Instabug-React-Native icon indicating copy to clipboard operation
Instabug-React-Native copied to clipboard

onSDKDismissedHandler wrong callback arguments values

Open kchasiotis opened this issue 4 years ago • 3 comments

Steps to Reproduce the Problem

Show Feedback Form

BugReporting.showWithOptions(BugReporting.reportType.feedback, [
    BugReporting.option.emailFieldOptional,
]);

When the form is submitted listen for it

BugReporting.onSDKDismissedHandler(function(dismissType, reportType) {
    if (dismissType === 'SUBMIT' && reportType === 'feedback') {
        console.log('user feedback');
    }
    console.log('-----------');
    console.log(dismissType);
    console.log(reportType);
    console.log(Instabug.dismissType.submit);
    console.log(BugReporting.reportType.feedback);
});

Expected Behaviour

The following logs return integer values based on the types below

console.log(Instabug.dismissType.submit);
console.log(BugReporting.reportType.feedback);

dismissType

export enum dismissType {
  submit,
  cancel,
  addAttachment
}

reportType

enum reportType {
  bug,
  feedback,
  question
}

Actual Behaviour

dismissType gets the string value 'SUBMIT' reportType gets the value 'feedback'

Instabug integration code

SDK Version

"version": "10.8.1"

React Native, iOS and Android Versions

"react": "17.0.1"

Android versions:

   ext {
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 29
        ndkVersion = "20.1.5948944"
    }

note: Tested on android only

Device Model

kchasiotis avatar Sep 01 '21 14:09 kchasiotis

@kchasiotis Thanks for reporting this. We'll look further into this and get back to you.

MahmoudMehisen avatar Sep 02 '21 10:09 MahmoudMehisen

@MahmoudMehisen cool, thank you!

kchasiotis avatar Sep 08 '21 10:09 kchasiotis

This issue has been automatically marked as pending feedback because we need additional information to be able to investigate it further. It will be closed in 7 days if it remains inactive. Thank you for your contributions.

stale[bot] avatar Feb 20 '23 18:02 stale[bot]