File tree 10 files changed +151
-107
lines changed
jsActions/mobile-resources-native
pluggableWidgets/image-native/src/components/__tests__/__snapshots__
10 files changed +151
-107
lines changed Original file line number Diff line number Diff line change 4
4
"react-native-device-info" : " 14.0.4" ,
5
5
"react-native-action-button" : " 2.8.5" ,
6
6
"react-native-material-menu" : " 1.2.0" ,
7
- "react-native-linear-gradient" : " 2.5.6 " ,
7
+ "react-native-linear-gradient" : " 3.0.0-alpha.1 " ,
8
8
"@react-native-community/netinfo" : " 11.4.1" ,
9
9
"react-native-svg" : " 15.7.1" ,
10
10
"react-native-system-navigation-bar" : " 2.6.3" ,
Original file line number Diff line number Diff line change 40
40
"react-native-localize" : " 3.2.1" ,
41
41
"react-native-permissions" : " 4.1.5" ,
42
42
"react-native-schedule-exact-alarm-permission" : " ^0.1.3" ,
43
- "react-native-sound " : " 0.11.0 " ,
43
+ "react-native-track-player " : " ^4.1.1 " ,
44
44
"url-parse" : " ^1.4.7"
45
45
},
46
46
"devDependencies" : {
Original file line number Diff line number Diff line change 5
5
// - the code between BEGIN USER CODE and END USER CODE
6
6
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7
7
// Other code you write will be lost the next time you deploy the project.
8
- import { NativeModules , Platform } from "react-native" ;
8
+ import { NativeModules } from "react-native" ;
9
9
import notifee from "@notifee/react-native" ;
10
10
11
11
// BEGIN EXTRA CODE
@@ -18,9 +18,8 @@ import notifee from "@notifee/react-native";
18
18
export async function CancelAllScheduledNotifications ( ) : Promise < void > {
19
19
// BEGIN USER CODE
20
20
// Documentation https://github.com/invertase/notifee
21
- const isIOS = Platform . OS === "ios" ;
22
- if ( NativeModules && isIOS && ! NativeModules . RNCPushNotificationIOS ) {
23
- return Promise . reject ( new Error ( "Notifications module is not available in your app" ) ) ;
21
+ if ( NativeModules && ! NativeModules . NotifeeApiModule ) {
22
+ return Promise . reject ( new Error ( "Notifee native module is not available in your app" ) ) ;
24
23
}
25
24
26
25
notifee . cancelAllNotifications ( ) ;
Original file line number Diff line number Diff line change 5
5
// - the code between BEGIN USER CODE and END USER CODE
6
6
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7
7
// Other code you write will be lost the next time you deploy the project.
8
- import { NativeModules , Platform } from "react-native" ;
8
+ import { NativeModules } from "react-native" ;
9
9
import notifee from "@notifee/react-native" ;
10
10
11
11
// BEGIN EXTRA CODE
@@ -18,9 +18,8 @@ import notifee from "@notifee/react-native";
18
18
export async function CancelScheduledNotification ( notificationId ?: string ) : Promise < void > {
19
19
// BEGIN USER CODE
20
20
// Documentation Documentation https://github.com/invertase/notifee
21
- const isIOS = Platform . OS === "ios" ;
22
- if ( NativeModules && isIOS && ! NativeModules . RNCPushNotificationIOS ) {
23
- return Promise . reject ( new Error ( "Notifications module is not available in your app" ) ) ;
21
+ if ( NativeModules && ! NativeModules . NotifeeApiModule ) {
22
+ return Promise . reject ( new Error ( "Notifee native module is not available in your app" ) ) ;
24
23
}
25
24
26
25
if ( ! notificationId ) {
Original file line number Diff line number Diff line change 5
5
// - the code between BEGIN USER CODE and END USER CODE
6
6
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7
7
// Other code you write will be lost the next time you deploy the project.
8
- import { NativeModules , Platform } from "react-native" ;
8
+ import { NativeModules } from "react-native" ;
9
9
import notifee from "@notifee/react-native" ;
10
10
11
11
// BEGIN EXTRA CODE
@@ -18,9 +18,8 @@ import notifee from "@notifee/react-native";
18
18
export async function ClearAllDeliveredNotifications ( ) : Promise < void > {
19
19
// BEGIN USER CODE
20
20
// Documentation Documentation https://github.com/invertase/notifee
21
- const isIOS = Platform . OS === "ios" ;
22
- if ( NativeModules && isIOS && ! NativeModules . RNCPushNotificationIOS ) {
23
- return Promise . reject ( new Error ( "Notifications module is not available in your app" ) ) ;
21
+ if ( NativeModules && ! NativeModules . NotifeeApiModule ) {
22
+ return Promise . reject ( new Error ( "Notifee native module is not available in your app" ) ) ;
24
23
}
25
24
26
25
notifee . cancelAllNotifications ( ) ;
Original file line number Diff line number Diff line change @@ -45,10 +45,10 @@ export async function DisplayNotification(
45
45
android : {
46
46
channelId,
47
47
// smallIcon: "ic_notification",
48
- sound : playSound ? "default" : undefined
48
+ ... ( playSound ? { sound : "default" } : { } )
49
49
} ,
50
50
ios : {
51
- sound : playSound ? "default" : undefined
51
+ ... ( playSound ? { sound : "default" } : { } )
52
52
}
53
53
} ;
54
54
Original file line number Diff line number Diff line change @@ -58,10 +58,10 @@ export async function ScheduleNotification(
58
58
android : {
59
59
channelId,
60
60
smallIcon : "ic_notification" ,
61
- sound : playSound ? "default" : undefined
61
+ ... ( playSound ? { sound : "default" } : { } )
62
62
} ,
63
63
ios : {
64
- sound : ! ! playSound
64
+ ... ( playSound ? { sound : "default" } : { } )
65
65
}
66
66
} ;
67
67
Original file line number Diff line number Diff line change 6
6
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7
7
// Other code you write will be lost the next time you deploy the project.
8
8
import { Big } from "big.js" ;
9
- import { NativeModules , Platform } from "react-native" ;
9
+ import { NativeModules } from "react-native" ;
10
10
import notifee from "@notifee/react-native" ;
11
11
12
12
// BEGIN EXTRA CODE
@@ -20,9 +20,8 @@ export async function SetBadgeNumber(badgeNumber?: Big): Promise<void> {
20
20
// BEGIN USER CODE
21
21
// Documentation Documentation https://github.com/invertase/notifee
22
22
23
- const isIOS = Platform . OS === "ios" ;
24
- if ( NativeModules && isIOS && ! NativeModules . RNCPushNotificationIOS ) {
25
- return Promise . reject ( new Error ( "Notifications module is not available in your app" ) ) ;
23
+ if ( NativeModules && ! NativeModules . NotifeeApiModule ) {
24
+ return Promise . reject ( new Error ( "Notifee native module is not available in your app" ) ) ;
26
25
}
27
26
28
27
if ( ! badgeNumber ) {
You can’t perform that action at this time.
0 commit comments