Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-notifications
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
冷佳娟
react-native-notifications
Commits
6ff04240
Commit
6ff04240
authored
Jul 09, 2019
by
yogevbd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix payload
parent
5f228aad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
RNNotifications/RCTConvert+Notifications.m
RNNotifications/RCTConvert+Notifications.m
+1
-1
lib/src/index.ios.js
lib/src/index.ios.js
+1
-13
No files found.
RNNotifications/RCTConvert+Notifications.m
View file @
6ff04240
...
...
@@ -117,7 +117,7 @@ RCT_ENUM_CONVERTER(UIUserNotificationActivationMode, (@{
formattedNotification
[
@"body"
]
=
RCTNullIfNil
(
content
.
body
);
formattedNotification
[
@"category"
]
=
RCTNullIfNil
(
content
.
categoryIdentifier
);
formattedNotification
[
@"thread"
]
=
RCTNullIfNil
(
content
.
threadIdentifier
);
formattedNotification
[
@"userInfo"
]
=
RCTNullIfNil
(
RCTJSONClean
(
content
.
userInfo
))
;
[
formattedNotification
addEntriesFromDictionary
:
RCTNullIfNil
(
RCTJSONClean
(
content
.
userInfo
))]
;
return
formattedNotification
;
}
...
...
lib/src/index.ios.js
View file @
6ff04240
...
...
@@ -84,7 +84,7 @@ export default class NotificationsIOS {
}
else
if
(
type
===
DEVICE_NOTIFICATION_OPENED_EVENT
)
{
listener
=
DeviceEventEmitter
.
addListener
(
type
,
(
{
payload
,
identifier
,
action
}
)
=>
handler
(
new
IOSNotification
(
payload
),
()
=>
{
(
payload
,
identifier
,
action
)
=>
handler
(
new
IOSNotification
(
payload
),
()
=>
{
NativeRNNotifications
.
finishHandlingAction
(
identifier
);
},
action
)
);
...
...
@@ -114,18 +114,6 @@ export default class NotificationsIOS {
}
}
static
_actionHandlerDispatcher
(
action
:
Object
)
{
const
actionHandler
=
_actionHandlers
.
get
(
action
.
identifier
);
if
(
actionHandler
)
{
action
.
notification
=
new
IOSNotification
(
action
.
notification
);
actionHandler
(
action
,
()
=>
{
NativeRNNotifications
.
finishHandlingAction
(
action
.
identifier
);
});
}
}
/**
* Sets the notification categories
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment