Skip to content

Commit e289204

Browse files
committed
typos
1 parent cab98a7 commit e289204

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public void addSMSSubscriptionObserver() {
269269
public void removeSMSSubscriptionObserver() {
270270
if (hasSetSMSSubscriptionObserver) {
271271
OneSignal.removeSMSSubscriptionObserver(this);
272-
hasSetSMSSubscriptionObserver = true;
272+
hasSetSMSSubscriptionObserver = false;
273273
}
274274
}
275275

ios/RCTOneSignal/RCTOneSignalEventEmitter.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body {
147147

148148
RCT_EXPORT_METHOD(removeSMSSubscriptionObserver) {
149149
if (_hasSetSMSSubscriptionObserver) {
150-
[OneSignal addSMSSubscriptionObserver:[RCTOneSignal sharedInstance]];
150+
[OneSignal removeSMSSubscriptionObserver:[RCTOneSignal sharedInstance]];
151151
_hasSetSMSSubscriptionObserver = false;
152152
}
153153
}

src/EventManager.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,6 @@ export default class EventManager {
6969
handlerArray && handlerArray.length > 0 ? handlerArray.push(handler) : this.eventHandlerArrayMap.set(eventName, [handler]);
7070
}
7171

72-
/**
73-
* Adds the event handler to the corresponding handler array on the JS side of the bridge
74-
* @param {string} eventName
75-
* @param {function} handler
76-
*/
77-
addEventHandler(eventName, handler) {
78-
let handlerArray = this.eventHandlerArrayMap.get(eventName);
79-
handlerArray && handlerArray.length > 0 ? handlerArray.push(handler) : this.eventHandlerArrayMap.set(eventName, [handler]);
80-
}
81-
8272
/**
8373
* clears the event handler(s) for the event name
8474
* @param {string} eventName

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ export default class OneSignal {
7878

7979
static clearSMSSubscriptionObservers() {
8080
if (!isObjectNonNull(RNOneSignal)) return;
81-
RNOneSignal.addSMSSubscriptionObserver();
82-
eventManager.addEventHandler(SMS_SUBSCRIPTION_CHANGED, observer);
81+
RNOneSignal.removeSMSSubscriptionObserver();
82+
eventManager.clearEventHandler(SMS_SUBSCRIPTION_CHANGED);
8383
}
8484

8585
/* H A N D L E R S */

0 commit comments

Comments
 (0)