We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a8e4f8 commit b73d9d3Copy full SHA for b73d9d3
android/src/main/java/io/ionic/portals/reactnative/ReactNativePortalsPubSub.kt
@@ -28,11 +28,16 @@ internal class PortalsPubSubModule(reactContext: ReactApplicationContext) :
28
.emit(eventName, result.toJSObject().toReactMap())
29
}
30
31
- subscriptionRefs[eventName] = ref
+ subscriptionRefs[topic] = ref
32
33
34
@ReactMethod
35
fun removeListeners(count: Int) {
36
+ subscriptionRefs.forEach {
37
+ PortalsPubSub.shared.unsubscribe(it.key, it.value)
38
+ }
39
+
40
+ subscriptionRefs.clear()
41
42
43
0 commit comments