Skip to content

Commit d53de07

Browse files
Add Android string keys for discarding attachment
1 parent a3b867a commit d53de07

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
200200
args.put("betaWelcomeMessageFinishStepContent", InstabugCustomTextPlaceHolder.Key.BETA_WELCOME_MESSAGE_FINISH_STEP_CONTENT);
201201
args.put("liveWelcomeMessageTitle", InstabugCustomTextPlaceHolder.Key.LIVE_WELCOME_MESSAGE_TITLE);
202202
args.put("liveWelcomeMessageContent", InstabugCustomTextPlaceHolder.Key.LIVE_WELCOME_MESSAGE_CONTENT);
203+
args.put("discardAlertCancel", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
204+
args.put("discardAlertAction", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
205+
args.put("addAttachmentButtonTitleStringName", InstabugCustomTextPlaceHolder.Key.REPORT_ADD_ATTACHMENT_HEADER);
203206
}
204207

205208
static void registerInstabugReportTypesArgs(Map<String, Object> args) {

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
228228
private final String REPORT_QUESTION_DESCRIPTION = "reportQuestionDescription";
229229
private final String REQUEST_FEATURE_DESCRIPTION = "requestFeatureDescription";
230230

231+
private final String REPORT_DISCARD_DIALOG_NEGATIVE_ACTION = "discardAlertCancel";
232+
private final String REPORT_DISCARD_DIALOG_POSITIVE_ACTION = "discardAlertAction";
233+
private final String REPORT_ADD_ATTACHMENT_HEADER = "addAttachmentButtonTitleStringName";
234+
231235
private Application androidApplication;
232236
private Instabug mInstabug;
233237
private InstabugInvocationEvent invocationEvent;
@@ -2309,6 +2313,12 @@ private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
23092313
return InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION_DESCRIPTION;
23102314
case REQUEST_FEATURE_DESCRIPTION:
23112315
return InstabugCustomTextPlaceHolder.Key.REQUEST_FEATURE_DESCRIPTION;
2316+
case REPORT_DISCARD_DIALOG_NEGATIVE_ACTION:
2317+
return InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION;
2318+
case REPORT_DISCARD_DIALOG_POSITIVE_ACTION:
2319+
return InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION;
2320+
case REPORT_ADD_ATTACHMENT_HEADER:
2321+
return InstabugCustomTextPlaceHolder.Key.REPORT_ADD_ATTACHMENT_HEADER;
23122322
default:
23132323
return null;
23142324
}
@@ -2484,6 +2494,10 @@ public Map<String, Object> getConstants() {
24842494
constants.put(REPORT_QUESTION_DESCRIPTION, REPORT_QUESTION_DESCRIPTION);
24852495
constants.put(REQUEST_FEATURE_DESCRIPTION, REQUEST_FEATURE_DESCRIPTION);
24862496

2497+
constants.put(REPORT_DISCARD_DIALOG_NEGATIVE_ACTION, REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
2498+
constants.put(REPORT_DISCARD_DIALOG_POSITIVE_ACTION, REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
2499+
constants.put(REPORT_ADD_ATTACHMENT_HEADER, REPORT_ADD_ATTACHMENT_HEADER);
2500+
24872501
return constants;
24882502
}
24892503
}

0 commit comments

Comments
 (0)