mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-06-17 04:09:38 +08:00
This commit is contained in:
@@ -56,18 +56,20 @@ export default class IOSNotification {
|
||||
this._threadIdentifier = data.threadIdentifier;
|
||||
}
|
||||
|
||||
const complete = (fetchResult: BackgroundFetchResultValue) => {
|
||||
const { notificationId } = notification;
|
||||
getLogger(notifications).debug(
|
||||
`Completion handler called for notificationId=${notificationId}`
|
||||
);
|
||||
getNativeModule(notifications).complete(notificationId, fetchResult);
|
||||
};
|
||||
if (notifications && notifications.ios) {
|
||||
const complete = (fetchResult: BackgroundFetchResultValue) => {
|
||||
const { notificationId } = notification;
|
||||
getLogger(notifications).debug(
|
||||
`Completion handler called for notificationId=${notificationId}`
|
||||
);
|
||||
getNativeModule(notifications).complete(notificationId, fetchResult);
|
||||
};
|
||||
|
||||
if (notifications.ios.shouldAutoComplete) {
|
||||
complete(notifications.ios.backgroundFetchResult.noData);
|
||||
} else {
|
||||
this._complete = complete;
|
||||
if (notifications.ios.shouldAutoComplete) {
|
||||
complete(notifications.ios.backgroundFetchResult.noData);
|
||||
} else {
|
||||
this._complete = complete;
|
||||
}
|
||||
}
|
||||
|
||||
// Defaults
|
||||
|
||||
Reference in New Issue
Block a user