2
0
mirror of synced 2025-01-23 20:59:10 +00:00

pass noop for android platform

This commit is contained in:
Ryan Grey 2018-07-23 16:52:24 +01:00
parent b6885b0125
commit fac0767d5d

View File

@ -90,7 +90,15 @@ export default class Notifications extends ModuleBase {
'notifications_notification_displayed', 'notifications_notification_displayed',
(notification: NativeNotification) => { (notification: NativeNotification) => {
const rnNotification = new Notification(notification); const rnNotification = new Notification(notification);
const done = (fetchResult: string) => getNativeModule(this).complete(rnNotification.notificationId, fetchResult); const done = Platform.select({
ios: (fetchResult: string) =>
getNativeModule(this).complete(
rnNotification.notificationId,
fetchResult
),
android: () => {},
});
SharedEventEmitter.emit( SharedEventEmitter.emit(
'onNotificationDisplayed', 'onNotificationDisplayed',
rnNotification, rnNotification,