This repository was archived by the owner on Jul 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
android/src/main/java/tech/bam/RNBatchPush Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,15 @@ You can enable do not disturb mode with the following steps:
6464
6565defaultConfig {
6666 ...
67- resValue "bool", "BATCH_DISABLE_DO_NOT_DISTURB ", "false "
67+ resValue "bool", "BATCH_DO_NOT_DISTURB_INITIAL_STATE ", "true "
6868}
6969```
7070
7171* On iOS, add in your ` Info.plist ` :
7272
7373``` xml
74- <key >BatchDisableDoNotDisturb </key >
75- <false />
74+ <key >BatchDoNotDisturbInitialState </key >
75+ <true />
7676```
7777
7878* Show pending in app message or mobile landing
Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ public static void initialize(Application application) {
8383 Batch .setConfig (new Config (batchAPIKey ));
8484
8585 try {
86- boolean disableDoNotDisturb = resources .getBoolean (resources .getIdentifier ("BATCH_DISABLE_DO_NOT_DISTURB " , "bool" , packageName ));
87- Batch .Messaging .setDoNotDisturbEnabled (! disableDoNotDisturb );
86+ boolean doNotDisturbEnabled = resources .getBoolean (resources .getIdentifier ("BATCH_DO_NOT_DISTURB_INITIAL_STATE " , "bool" , packageName ));
87+ Batch .Messaging .setDoNotDisturbEnabled (doNotDisturbEnabled );
8888 } catch (Resources .NotFoundException e ) {
8989 Batch .Messaging .setDoNotDisturbEnabled (false );
9090 }
Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ + (void)start
3535
3636 NSDictionary *info = [[NSBundle mainBundle ] infoDictionary ];
3737
38- id disableDoNotDisturb = [info objectForKey: @" BatchDisableDoNotDisturb " ];
39- if (disableDoNotDisturb != nil ) {
40- [BatchMessaging setDoNotDisturb: ![disableDoNotDisturb boolValue ]];
38+ id doNotDisturbEnabled = [info objectForKey: @" BatchDoNotDisturbInitialState " ];
39+ if (doNotDisturbEnabled != nil ) {
40+ [BatchMessaging setDoNotDisturb: [doNotDisturbEnabled boolValue ]];
4141 } else {
4242 [BatchMessaging setDoNotDisturb: false ];
4343 }
You can’t perform that action at this time.
0 commit comments