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);
|
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
|
RCT_EXPORT_METHOD(scheduleNotification:(NSDictionary*) notification
|
||||||
resolver:(RCTPromiseResolveBlock)resolve
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
|
@ -91,4 +91,21 @@ export default class AndroidNotifications {
|
|||||||
}
|
}
|
||||||
return Promise.resolve();
|
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);
|
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
|
* Schedule a notification
|
||||||
* @param notification
|
* @param notification
|
||||||
|
Loading…
x
Reference in New Issue
Block a user