Skip to content

Commit 9ce24d0

Browse files
committed
Bump to 3.3.1
1 parent e94c260 commit 9ce24d0

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,9 @@ type NotificationSettings = {
754754
carPlay?: boolean;
755755
criticalAlert?: boolean;
756756
provisional?: boolean;
757+
providesAppSettings?: boolean;
757758
lockScreen?: boolean;
758759
notificationCenter?: boolean;
759-
providesAppSettings?: boolean;
760760
};
761761

762762
function checkNotifications(): Promise<{
@@ -802,9 +802,9 @@ type NotificationSettings = {
802802
carPlay?: boolean;
803803
criticalAlert?: boolean;
804804
provisional?: boolean;
805+
providesAppSettings?: boolean;
805806
lockScreen?: boolean;
806807
notificationCenter?: boolean;
807-
providesAppSettings?: boolean;
808808
};
809809

810810
function requestNotifications(options: NotificationOption[]): Promise<{

example/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ export const App = () => {
154154
{`carPlay: ${notifications.settings.carPlay}\n`}
155155
{`criticalAlert: ${notifications.settings.criticalAlert}\n`}
156156
{`provisional: ${notifications.settings.provisional}\n`}
157+
{`providesAppSettings: ${notifications.settings.providesAppSettings}\n`}
157158
{`lockScreen: ${notifications.settings.lockScreen}\n`}
158159
{`notificationCenter: ${notifications.settings.notificationCenter}\n`}
159-
{`providesAppSettings: ${notifications.settings.providesAppSettings}\n`}
160160
</Text>
161161
)}
162162
</>

mock.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ export const request = jest.fn(async (permission) => RESULTS.GRANTED);
1919
export const checkLocationAccuracy = jest.fn(async () => 'full');
2020
export const requestLocationAccuracy = jest.fn(async (options) => 'full');
2121

22-
const notificationOptions = ['alert', 'badge', 'sound', 'carPlay', 'criticalAlert', 'provisional'];
22+
const notificationOptions = [
23+
'alert',
24+
'badge',
25+
'sound',
26+
'carPlay',
27+
'criticalAlert',
28+
'provisional',
29+
'providesAppSettings',
30+
];
2331

2432
const notificationSettings = {
2533
alert: true,
@@ -28,6 +36,7 @@ const notificationSettings = {
2836
carPlay: true,
2937
criticalAlert: true,
3038
provisional: true,
39+
providesAppSettings: true,
3140
lockScreen: true,
3241
notificationCenter: true,
3342
};
@@ -48,17 +57,11 @@ export const requestNotifications = jest.fn(async (options) => ({
4857
}));
4958

5059
export const checkMultiple = jest.fn(async (permissions) =>
51-
permissions.reduce((acc, permission) => ({
52-
...acc,
53-
[permission]: RESULTS.GRANTED,
54-
}), {}),
60+
permissions.reduce((acc, permission) => ({...acc, [permission]: RESULTS.GRANTED}), {}),
5561
);
5662

5763
export const requestMultiple = jest.fn(async (permissions) =>
58-
permissions.reduce((acc, permission) => ({
59-
...acc,
60-
[permission]: RESULTS.GRANTED,
61-
}), {}),
64+
permissions.reduce((acc, permission) => ({...acc, [permission]: RESULTS.GRANTED}), {}),
6265
);
6366

6467
export default {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-permissions",
3-
"version": "3.3.0",
3+
"version": "3.3.1",
44
"license": "MIT",
55
"description": "An unified permissions API for React Native on iOS, Android and Windows",
66
"author": "Mathieu Acthernoene <[email protected]>",

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ export type NotificationSettings = {
3636
carPlay?: boolean;
3737
criticalAlert?: boolean;
3838
provisional?: boolean;
39+
providesAppSettings?: boolean;
3940
lockScreen?: boolean;
4041
notificationCenter?: boolean;
41-
providesAppSettings?: boolean;
4242
};
4343

4444
export type NotificationsResponse = {

0 commit comments

Comments
 (0)