Skip to content

Commit

Permalink
Prepare v2.1.1 (#98)
Browse files Browse the repository at this point in the history
* Prepare v2.1.1

* Remove useless comments

* Bump to version 2.1.1

---------

Co-authored-by: Pusher CI <[email protected]>
  • Loading branch information
fbenevides and pusher-ci authored Feb 24, 2023
1 parent e520858 commit e7c01f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.1.1

* [CHANGED] Change call of activity.runOnUiThread to invoke methodChannel

## 2.1.0

* [CHANGED] Allow reinitialization of the pusher singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ class PusherChannelsFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAw
}

override fun onSubscriptionSucceeded(channelName: String) {
// For presence channels we wait for the onUsersInformationReceived event.
if (!channelName.startsWith("presence-")) {
callback(
"onEvent", mapOf(
Expand All @@ -239,17 +238,16 @@ class PusherChannelsFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAw
}

override fun onAuthenticationFailure(message: String, e: Exception) {
// Log.e(TAG, "Authentication failure due to $message, exception was $e")
callback(
"onSubscriptionError", mapOf(
"message" to message,
"error" to e.toString()
)
)
} // Other ChannelEventListener methods

}

// Other ChannelEventListener methods
override fun onUsersInformationReceived(channelName: String?, users: MutableSet<User>?) {
// Log.i(TAG, "Users received: $users")
val gson = Gson()
val channel = pusher!!.getPresenceChannel(channelName)
val hash = mutableMapOf<String, Any?>()
Expand All @@ -275,7 +273,6 @@ class PusherChannelsFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAw
}

override fun onDecryptionFailure(event: String?, reason: String?) {
// Log.e(TAG, "Decryption failure due to $event, exception was $reason")
callback(
"onDecryptionFailure", mapOf(
"event" to event,
Expand All @@ -285,7 +282,6 @@ class PusherChannelsFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAw
}

override fun userSubscribed(channelName: String, user: User) {
// Log.i(TAG, "A new user joined channel [$channelName]: ${user.id}, ${user.info}")
callback(
"onMemberAdded", mapOf(
"channelName" to channelName,
Expand All @@ -298,7 +294,6 @@ class PusherChannelsFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAw
}

override fun userUnsubscribed(channelName: String, user: User) {
// Log.i(TAG, "A user left channel [$channelName]: ${user.id}, ${user.info}")
callback(
"onMemberRemoved", mapOf(
"channelName" to channelName,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pusher_channels_flutter
description: Pusher Channels Flutter Plugin
version: 2.1.0
version: 2.1.1
homepage: https://github.com/pusher/pusher-channels-flutter
repository: https://github.com/pusher/pusher-channels-flutter
issue_tracker: https://github.com/pusher/pusher-channels-flutter/issues
Expand Down

0 comments on commit e7c01f8

Please sign in to comment.