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

View File

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