Skip to content

Commit

Permalink
Remove all listeners on initialization (#119)
Browse files Browse the repository at this point in the history
* Remove all listeners on initialization

* Bump to version 1.3.0

* Fix typo

* Fix more typos on CHANGELOG

---------

Co-authored-by: Pusher CI <[email protected]>
  • Loading branch information
fbenevides and pusher-ci authored Oct 11, 2023
1 parent ce2bc29 commit 067f8ff
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 55 deletions.
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

0 comments on commit 067f8ff

Please sign in to comment.