Skip to content
This repository was archived by the owner on Jul 28, 2022. It is now read-only.

Commit 0e5a935

Browse files
committed
Change BATCH_DISABLE_DO_NOT_DISTURB to BATCH_DO_NOT_DISTURB_INITIAL_STATE
1 parent 7efa599 commit 0e5a935

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ You can enable do not disturb mode with the following steps:
6464
6565
defaultConfig {
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

android/src/main/java/tech/bam/RNBatchPush/RNBatchModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

ios/RNBatch.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)