move removeDeliveredNotificationsByTag to android specific file
This commit is contained in:
parent
89806d97f7
commit
8b81e74f50
|
@ -343,13 +343,6 @@ RCT_EXPORT_METHOD(removeDeliveredNotification:(NSString*) notificationId
|
|||
resolve(nil);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(removeDeliveredNotificationsByTag:(NSString*) tag
|
||||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||
// No implementation for ios
|
||||
resolve(nil);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(scheduleNotification:(NSDictionary*) notification
|
||||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||
|
|
|
@ -91,4 +91,21 @@ export default class AndroidNotifications {
|
|||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a delivered notifications by tag.
|
||||
* @param tag
|
||||
*/
|
||||
removeDeliveredNotificationsByTag(tag: string): Promise<void> {
|
||||
if (!tag) {
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
'Notifications: removeDeliveredNotificationsByTag expects a `tag`'
|
||||
)
|
||||
);
|
||||
}
|
||||
return getNativeModule(
|
||||
this._notifications
|
||||
).removeDeliveredNotificationsByTag(tag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,21 +291,6 @@ export default class Notifications extends ModuleBase {
|
|||
return getNativeModule(this).removeDeliveredNotification(notificationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a delivered notifications by tag.
|
||||
* @param tag
|
||||
*/
|
||||
removeDeliveredNotificationsByTag(tag: string): Promise<void> {
|
||||
if (!tag) {
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
'Notifications: removeDeliveredNotificationsByTag expects a `tag`'
|
||||
)
|
||||
);
|
||||
}
|
||||
return getNativeModule(this).removeDeliveredNotificationsByTag(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule a notification
|
||||
* @param notification
|
||||
|
|
Loading…
Reference in New Issue