Skip to content

Commit

Permalink
Merge pull request #917 from experionarjun/feature/unsubscribeFromTopic
Browse files Browse the repository at this point in the history
Added functionality to Unsubscribe from Topic
  • Loading branch information
Dallas62 authored Apr 26, 2020
2 parents d7705f8 + 72ca630 commit fc6a7cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ public void onComplete(@NonNull Task<InstanceIdResult> task) {
public void subscribeToTopic(String topic) {
FirebaseMessaging.getInstance().subscribeToTopic(topic);
}

@ReactMethod
public void unsubscribeFromTopic(String topic) {
FirebaseMessaging.getInstance().unsubscribeFromTopic(topic);
}

@ReactMethod
public void presentLocalNotification(ReadableMap details) {
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ Notifications.subscribeToTopic = function() {
return this.callNative('subscribeToTopic', arguments);
};

Notifications.unsubscribeFromTopic = function () {
return this.callNative('unsubscribeFromTopic', arguments);
};

Notifications.presentLocalNotification = function() {
return this.callNative('presentLocalNotification', arguments);
};
Expand Down

0 comments on commit fc6a7cf

Please sign in to comment.