Skip to content

Commit 6687260

Browse files
Add string keys for attch discard alert title and message
1 parent 9042427 commit 6687260

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ 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("discardAlertTitle", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_TITLE);
204+
args.put("discardAlertMessage", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_BODY);
203205
args.put("discardAlertCancel", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
204206
args.put("discardAlertAction", InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
205207
args.put("addAttachmentButtonTitleStringName", InstabugCustomTextPlaceHolder.Key.REPORT_ADD_ATTACHMENT_HEADER);

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ 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_TITLE = "discardAlertTitle";
232+
private final String REPORT_DISCARD_DIALOG_BODY = "discardAlertMessage";
231233
private final String REPORT_DISCARD_DIALOG_NEGATIVE_ACTION = "discardAlertCancel";
232234
private final String REPORT_DISCARD_DIALOG_POSITIVE_ACTION = "discardAlertAction";
233235
private final String REPORT_ADD_ATTACHMENT_HEADER = "addAttachmentButtonTitleStringName";
@@ -2313,6 +2315,10 @@ private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) {
23132315
return InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION_DESCRIPTION;
23142316
case REQUEST_FEATURE_DESCRIPTION:
23152317
return InstabugCustomTextPlaceHolder.Key.REQUEST_FEATURE_DESCRIPTION;
2318+
case REPORT_DISCARD_DIALOG_TITLE:
2319+
return InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_TITLE;
2320+
case REPORT_DISCARD_DIALOG_BODY:
2321+
return InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_BODY;
23162322
case REPORT_DISCARD_DIALOG_NEGATIVE_ACTION:
23172323
return InstabugCustomTextPlaceHolder.Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION;
23182324
case REPORT_DISCARD_DIALOG_POSITIVE_ACTION:
@@ -2494,6 +2500,8 @@ public Map<String, Object> getConstants() {
24942500
constants.put(REPORT_QUESTION_DESCRIPTION, REPORT_QUESTION_DESCRIPTION);
24952501
constants.put(REQUEST_FEATURE_DESCRIPTION, REQUEST_FEATURE_DESCRIPTION);
24962502

2503+
constants.put(REPORT_DISCARD_DIALOG_TITLE, REPORT_DISCARD_DIALOG_TITLE);
2504+
constants.put(REPORT_DISCARD_DIALOG_BODY, REPORT_DISCARD_DIALOG_BODY);
24972505
constants.put(REPORT_DISCARD_DIALOG_NEGATIVE_ACTION, REPORT_DISCARD_DIALOG_NEGATIVE_ACTION);
24982506
constants.put(REPORT_DISCARD_DIALOG_POSITIVE_ACTION, REPORT_DISCARD_DIALOG_POSITIVE_ACTION);
24992507
constants.put(REPORT_ADD_ATTACHMENT_HEADER, REPORT_ADD_ATTACHMENT_HEADER);

index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ export enum strings {
433433
reportFeedbackDescription,
434434
reportQuestionDescription,
435435
requestFeatureDescription,
436+
discardAlertTitle,
437+
discardAlertMessage,
436438
discardAlertCancel,
437439
discardAlertAction,
438440
addAttachmentButtonTitleStringName

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,8 @@ const InstabugModule = {
10751075
reportFeedbackDescription: Instabug.reportFeedbackDescription,
10761076
reportQuestionDescription: Instabug.reportQuestionDescription,
10771077
requestFeatureDescription: Instabug.requestFeatureDescription,
1078+
discardAlertTitle: Instabug.discardAlertTitle,
1079+
discardAlertMessage: Instabug.discardAlertMessage,
10781080
discardAlertCancel: Instabug.discardAlertCancel,
10791081
discardAlertAction: Instabug.discardAlertAction,
10801082
addAttachmentButtonTitleStringName: Instabug.addAttachmentButtonTitleStringName

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,8 @@ - (NSDictionary *)constantsToExport
579579
@"reportQuestionDescription": kIBGReportQuestionDescriptionStringName,
580580
@"requestFeatureDescription": kIBGRequestFeatureDescriptionStringName,
581581

582+
@"discardAlertTitle": kIBGDiscardAlertTitle,
583+
@"discardAlertMessage": kIBGDiscardAlertMessage,
582584
@"discardAlertCancel": kIBGDiscardAlertCancel,
583585
@"discardAlertAction": kIBGDiscardAlertAction,
584586
@"addAttachmentButtonTitleStringName": kIBGAddAttachmentButtonTitleStringName

0 commit comments

Comments
 (0)