Skip to content

Remove all listeners on initialization #119

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

Merged
merged 4 commits into from
Oct 11, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 58 additions & 54 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,58 @@
# Changelog

## 1.2.3

* [FIXED] Handle exceptions properly while subscribing to a channel on Android (#104)


## 1.2.2

* [FIXED] Crash when a user subscribes to a channel twice on Android
* [FIXED] Wait for unsubscription before deleting the local channel (#88)

## 1.2.1

* [FIXED] Fixed event name conflicts with other libs using RCTDeviceEventEmitter

## 1.2.0

* [CHANGED] Remove mutex locks in favor of storing callbacks so onAuthorizer does no longer freeze the app on iOS

## 1.1.1

* [CHANGED] Allow re-init of the Pusher singleton.
* [CHANGED] Update dependencies

## 1.1.0

* [CHANGED] Add support for the new subscription_count event
* [CHANGED] Using latest pusher-websocket-java and pusher-websocket-swift

## 1.0.2

* [CHANGED] Use latest pusher websocket java sdk.
* [ADDED] Example to use a custom authorizer.

## 1.0.1

* [ADDED] Add onAuthorizer support to iOS

## 1.0.0

* [CHANGED] Removed unsupported functions from README
* [FIXED] Fixed build error on Example app
* [FIXED] Fixed CHANGELOG error on release workflow

## 1.0.0-beta1

* [FIXED] Fixed required dependencies on README
* [ADDED] Add Lint support for Pull Requests
* [CHANGED] Executed Lint on Example app

## 0.0.1-beta1

* [ADDED] First beta release 🥳
# Changelog

## 1.3.0

* [ADDED] Add `reset` function to `Pusher` instance to reset all handlers and subscriptions (#110)
* [FIXED] Multiple listeners are registered whenever `init function is called

## 1.2.3

* [FIXED] Handle exceptions properly while subscribing to a channel on Android (#104)

## 1.2.2

* [FIXED] Crash when a user subscribes to a channel twice on Android
* [FIXED] Wait for unsubscription before deleting the local channel (#88)

## 1.2.1

* [FIXED] Fixed event name conflicts with other libs using RCTDeviceEventEmitter

## 1.2.0

* [CHANGED] Remove mutex locks in favor of storing callbacks so onAuthorizer does no longer freeze the app on iOS

## 1.1.1

* [CHANGED] Allow re-init of the Pusher singleton.
* [CHANGED] Update dependencies

## 1.1.0

* [CHANGED] Add support for the new subscription_count event
* [CHANGED] Using latest pusher-websocket-java and pusher-websocket-swift

## 1.0.2

* [CHANGED] Use latest pusher websocket java sdk.
* [ADDED] Example to use a custom authorizer.

## 1.0.1

* [ADDED] Add onAuthorizer support to iOS

## 1.0.0

* [CHANGED] Removed unsupported functions from README
* [FIXED] Fixed build error on Example app
* [FIXED] Fixed CHANGELOG error on release workflow

## 1.0.0-beta1

* [FIXED] Fixed required dependencies on README
* [ADDED] Add Lint support for Pull Requests
* [CHANGED] Executed Lint on Example app

## 0.0.1-beta1

* [ADDED] First beta release 🥳
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pusher/pusher-websocket-react-native",
"version": "1.2.3",
"version": "1.3.0",
"description": "Pusher Channels Client for React Native",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
2 changes: 2 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ export class Pusher {
onMemberAdded?: (channelName: string, member: PusherMember) => void;
onMemberRemoved?: (channelName: string, member: PusherMember) => void;
}) {
this.removeAllListeners();

this.addListener(
PusherEventName.ON_CONNECTION_STATE_CHANGE,
(event: any) => {
Expand Down