Pass notifications (not ios notifications) into IOSNotification

This commit is contained in:
Ryan Grey 2018-08-15 10:31:40 +01:00
parent cfb5f3a304
commit 363c315d60
2 changed files with 6 additions and 7 deletions

View File

@ -3,9 +3,8 @@
* IOSNotification representation wrapper * IOSNotification representation wrapper
*/ */
import type Notification from './Notification'; import type Notification from './Notification';
import IOSNotifications, { import type Notifications from '.';
type BackgroundFetchResultValue, import { type BackgroundFetchResultValue } from './IOSNotifications';
} from './IOSNotifications';
import type { import type {
IOSAttachment, IOSAttachment,
IOSAttachmentOptions, IOSAttachmentOptions,
@ -42,7 +41,7 @@ export default class IOSNotification {
constructor( constructor(
notification: Notification, notification: Notification,
notifications: IOSNotifications, notifications: Notifications,
data?: NativeIOSNotification data?: NativeIOSNotification
) { ) {
this._notification = notification; this._notification = notification;
@ -65,8 +64,8 @@ export default class IOSNotification {
getNativeModule(notifications).complete(notificationId, fetchResult); getNativeModule(notifications).complete(notificationId, fetchResult);
}; };
if (notifications.shouldAutoComplete) { if (notifications.ios.shouldAutoComplete) {
complete(notifications.backgroundFetchResult.noData); complete(notifications.ios.backgroundFetchResult.noData);
} else { } else {
this._complete = complete; this._complete = complete;
} }

View File

@ -57,7 +57,7 @@ export default class Notification {
); );
this._ios = new IOSNotification( this._ios = new IOSNotification(
this, this,
notifications.ios, notifications,
nativeNotification && nativeNotification.ios nativeNotification && nativeNotification.ios
); );