Skip to content

Commit

Permalink
Merge pull request #130 from sendbird/v4.2.30
Browse files Browse the repository at this point in the history
Add 4.2.30.
  • Loading branch information
sf-tyler-jeong authored Dec 5, 2024
2 parents 8f09912 + 7432b39 commit 5c36a4f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v4.2.30 (Dec 5, 2024)

### Improvements
- Fixed the reconnection bug when moving to background and then moving to foreground quickly

## v4.2.29 (Nov 20, 2024)

### Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Before installing Sendbird Chat SDK, you need to create a Sendbird application o

```yaml
dependencies:
sendbird_chat_sdk: ^4.2.29
sendbird_chat_sdk: ^4.2.30
```
- Run `flutter pub get` command in your project directory.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/internal/main/chat/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ part 'chat_notifications.dart';
part 'chat_push.dart';
part 'chat_user.dart';

const sdkVersion = '4.2.29';
const sdkVersion = '4.2.30';

// Internal implementation for main class. Do not directly access this class.
class Chat with WidgetsBindingObserver {
Expand Down
5 changes: 3 additions & 2 deletions lib/src/internal/main/chat_manager/connection_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class ConnectionManager {
reconnectTimer = null;
}

final isClosedSuccessfully = await webSocketClient.close();
await webSocketClient.close();

final disconnectedUserId = chat.chatContext.currentUserId ?? '';

Expand Down Expand Up @@ -292,7 +292,8 @@ class ConnectionManager {
await chat.eventDispatcher.onDisconnected();
}

if (fromEnterBackground && !chat.isBackground && !isClosedSuccessfully) {
if (fromEnterBackground && !chat.isBackground && !isReconnecting()) {
sbLog.i(StackTrace.current, 'reconnect()');
chat.connectionManager.reconnect(reset: true); // Check
} else {
if (isReconnecting()) {
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: sendbird_chat_sdk
description: With Sendbird Chat for Flutter, you can easily build an in-app chat with all the essential messaging features.
version: 4.2.29
version: 4.2.30
homepage: https://sendbird.com
repository: https://github.com/sendbird/sendbird-chat-sdk-flutter
documentation: https://sendbird.com/docs/chat/sdk/v4/flutter/getting-started/send-first-message
Expand Down

0 comments on commit 5c36a4f

Please sign in to comment.