Ensure notificationId is set before constructing IOSNotification
This commit is contained in:
parent
0af7c02955
commit
cfb5f3a304
|
@ -42,6 +42,15 @@ export default class Notification {
|
|||
nativeNotification?: NativeNotification,
|
||||
notifications: Notifications
|
||||
) {
|
||||
if (nativeNotification) {
|
||||
this._body = nativeNotification.body;
|
||||
this._data = nativeNotification.data;
|
||||
this._notificationId = nativeNotification.notificationId;
|
||||
this._sound = nativeNotification.sound;
|
||||
this._subtitle = nativeNotification.subtitle;
|
||||
this._title = nativeNotification.title;
|
||||
}
|
||||
|
||||
this._android = new AndroidNotification(
|
||||
this,
|
||||
nativeNotification && nativeNotification.android
|
||||
|
@ -52,15 +61,6 @@ export default class Notification {
|
|||
nativeNotification && nativeNotification.ios
|
||||
);
|
||||
|
||||
if (nativeNotification) {
|
||||
this._body = nativeNotification.body;
|
||||
this._data = nativeNotification.data;
|
||||
this._notificationId = nativeNotification.notificationId;
|
||||
this._sound = nativeNotification.sound;
|
||||
this._subtitle = nativeNotification.subtitle;
|
||||
this._title = nativeNotification.title;
|
||||
}
|
||||
|
||||
// Defaults
|
||||
this._data = this._data || {};
|
||||
// TODO: Is this the best way to generate an ID?
|
||||
|
|
Loading…
Reference in New Issue