Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expo-notifications] Smaller fixes #6790

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -41,12 +41,12 @@ public String getName() {

@Override
public void onCreate(ModuleRegistry moduleRegistry) {
mEventEmitter = moduleRegistry.getModule(EventEmitter.class);

// Register the module as a listener in PushTokenManager singleton module.
// Deregistration happens in onDestroy callback.
mPushTokenManager = moduleRegistry.getSingletonModule("PushTokenManager", PushTokenManager.class);
mPushTokenManager.addListener(this);

mEventEmitter = moduleRegistry.getModule(EventEmitter.class);
}

@Override
Expand Down
Expand Up @@ -5,7 +5,7 @@

#import <UMCore/UMEventEmitterService.h>

static const NSString *onDevicePushTokenEventName = @"onDevicePushToken";
static NSString * const onDevicePushTokenEventName = @"onDevicePushToken";

@interface EXPushTokenModule ()

Expand Down Expand Up @@ -57,7 +57,7 @@ - (void)setModuleRegistry:(UMModuleRegistry *)moduleRegistry

- (NSArray<NSString *> *)supportedEvents
{
return @[(NSString *)onDevicePushTokenEventName];
return @[onDevicePushTokenEventName];
}

- (void)startObserving
Expand Down Expand Up @@ -102,7 +102,7 @@ - (void)onDidRegisterWithDeviceToken:(NSData *)devicePushToken
}

if (_isBeingObserved) {
[_eventEmitter sendEventWithName:(NSString *)onDevicePushTokenEventName
[_eventEmitter sendEventWithName:onDevicePushTokenEventName
body:@{ @"devicePushToken": stringToken }];
}
}
Expand Down