mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
[ReactNative] Put launchOptions in RCTPushNotificationManager
This commit is contained in:
@@ -5,8 +5,12 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var NativeModules = require('NativeModules');
|
||||
var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
|
||||
|
||||
var RCTPushNotificationManager = NativeModules.RCTPushNotificationManager;
|
||||
|
||||
var _initialNotification = RCTPushNotificationManager.initialNotification;
|
||||
var _notifHandlers = {};
|
||||
|
||||
var DEVICE_NOTIF_EVENT = 'remoteNotificationReceived';
|
||||
@@ -30,6 +34,14 @@ class PushNotificationIOS {
|
||||
_notifHandlers[handler] = null;
|
||||
}
|
||||
|
||||
|
||||
static popInitialNotification() {
|
||||
var initialNotification = _initialNotification &&
|
||||
new PushNotificationIOS(_initialNotification);
|
||||
_initialNotification = null;
|
||||
return initialNotification;
|
||||
}
|
||||
|
||||
constructor(nativeNotif) {
|
||||
this._data = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user