Skip to content

Commit

Permalink
fix(android): Fix android events not emitting (#49)
Browse files Browse the repository at this point in the history
* fix(android): Remove doubled-up `'PortalsSubscription:'` prefix that was causing Android pub/sub to not emit properly
* chore(android): Remove string interpolation
  • Loading branch information
Steven0351 committed Oct 2, 2023
1 parent bbc42cc commit 8323ad6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16,176 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@ lib/
example/android/app/src/main/assets
.vercel
docs/

package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal class PortalsPubSubModule(reactContext: ReactApplicationContext) :
val ref = PortalsPubSub.shared.subscribe(topic) { result ->
reactApplicationContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
.emit("PortalsSubscription:$eventName", result.toJSObject().toReactMap())
.emit(eventName, result.toJSObject().toReactMap())
}

subscriptionRefs[eventName] = ref
Expand Down

1 comment on commit 8323ad6

@vercel
Copy link

@vercel vercel bot commented on 8323ad6 Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.