Skip to content

Commit

Permalink
Merge pull request #87 from sendbird/v4.1.1
Browse files Browse the repository at this point in the history
Add 4.1.1.
  • Loading branch information
sf-tyler-jeong authored Nov 8, 2023
2 parents 080a549 + c38104c commit 534fc28
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v4.1.1 (Nov 8, 2023)

### Improvements
- Updated `connectivity_plus` package to `5.0.1`

## v4.1.0 (Nov 3, 2023)

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

```yaml
dependencies:
sendbird_chat_sdk: ^4.1.0
sendbird_chat_sdk: ^4.1.1
```
- 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 @@ -58,7 +58,7 @@ part 'chat_notifications.dart';
part 'chat_push.dart';
part 'chat_user.dart';

const sdkVersion = '4.1.0';
const sdkVersion = '4.1.1';

// Internal implementation for main class. Do not directly access this class.
class Chat with WidgetsBindingObserver {
Expand Down
3 changes: 1 addition & 2 deletions lib/src/internal/main/chat/chat_event_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ extension ChatEventHandler on Chat {
eventManager.removeAllChannelHandlers();
}

void addConnectionHandler(
String identifier, ConnectionHandler handler) {
void addConnectionHandler(String identifier, ConnectionHandler handler) {
sbLog.i(StackTrace.current, 'identifier: $identifier');
eventManager.addConnectionHandler(identifier, handler);
}
Expand Down
10 changes: 5 additions & 5 deletions lib/src/internal/main/chat/chat_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ extension ChatUser on Chat {
}) async {
sbLog.i(StackTrace.current, 'nickname: $nickname');

if (nickname == null && profileFileInfo == null && preferredLanguages == null) {
if (nickname == null &&
profileFileInfo == null &&
preferredLanguages == null) {
throw InvalidParameterException();
}

Expand Down Expand Up @@ -73,8 +75,7 @@ extension ChatUser on Chat {

Future<DoNotDisturb> getDoNotDisturb() async {
sbLog.i(StackTrace.current);
return await apiClient
.send<DoNotDisturb>(UserDoNotDisturbGetRequest(this));
return await apiClient.send<DoNotDisturb>(UserDoNotDisturbGetRequest(this));
}

Future<void> setSnoozePeriod({
Expand Down Expand Up @@ -105,7 +106,6 @@ extension ChatUser on Chat {

Future<SnoozePeriod> getSnoozePeriod() async {
sbLog.i(StackTrace.current);
return await apiClient
.send<SnoozePeriod>(UserSnoozePeriodGetRequest(this));
return await apiClient.send<SnoozePeriod>(UserSnoozePeriodGetRequest(this));
}
}
3 changes: 1 addition & 2 deletions lib/src/internal/main/chat_cache/cache_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ extension Operation on Cacheable {

void removeFromCache(Chat chat) {
final cacheKey = this is BaseChannel ? null : key;
chat.channelCache
.delete(channelKey: primaryKey, key: cacheKey, data: this);
chat.channelCache.delete(channelKey: primaryKey, key: cacheKey, data: this);
}
}
3 changes: 2 additions & 1 deletion lib/src/internal/main/logger/logger_stack_trace.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class LoggerStackTrace {
callerFunctionName: callerFunctionName,
fileName: fileInfo.isNotEmpty ? fileInfo[0] : '',
lineNumber: fileInfo.length >= 2 ? fileInfo[1] : '',
columnNumber: fileInfo.length >= 3 ? fileInfo[2].replaceFirst(')', '') : '',
columnNumber:
fileInfo.length >= 3 ? fileInfo[2].replaceFirst(')', '') : '',
);
}

Expand Down
3 changes: 2 additions & 1 deletion lib/src/internal/main/model/reconnect_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ReconnectTask {

void increaseRetryCount() {
if (_backOffPeriod < config.maxInterval) {
final newBackOff = config.interval * pow(config.multiplier, (_retryCount - 1));
final newBackOff =
config.interval * pow(config.multiplier, (_retryCount - 1));
_backOffPeriod = min(newBackOff.toInt(), config.maxInterval.toInt());
}
_retryCount++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class GroupChannelScheduledMessageListGetRequest extends ApiRequest {
@override
HttpMethod get method => HttpMethod.get;

final scheduledMessageListOrderEnumMap = <ScheduledMessageListQueryOrder, String>{
final scheduledMessageListOrderEnumMap =
<ScheduledMessageListQueryOrder, String>{
ScheduledMessageListQueryOrder.createdAt: 'created_at',
ScheduledMessageListQueryOrder.scheduledAt: 'scheduled_at',
};
Expand All @@ -31,7 +32,8 @@ class GroupChannelScheduledMessageListGetRequest extends ApiRequest {
bool? reverse,
List<ScheduledStatus>? status,
MessageTypeFilter? messageType,
ScheduledMessageListQueryOrder? order = ScheduledMessageListQueryOrder.createdAt,
ScheduledMessageListQueryOrder? order =
ScheduledMessageListQueryOrder.createdAt,
}) : super(chat: chat) {
url = 'scheduled_messages';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class PollChangelogsGetRequest extends ApiRequest {
int? ts,
int limit = pollChangeLogsLimit,
}) : super(chat: chat) {
url =
"${channelType.urlString}/$channelUrl/polls/changelogs";
url = "${channelType.urlString}/$channelUrl/polls/changelogs";
queryParams = {
'token': token,
'change_ts': ts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class GroupChannelChangeLogs {
this.token,
});

static GroupChannelChangeLogs fromJsonWithChat(Chat chat, Map<String, dynamic> json) {
static GroupChannelChangeLogs fromJsonWithChat(
Chat chat, Map<String, dynamic> json) {
final res = _$GroupChannelChangeLogsFromJson(json);

for (final channel in res.updatedChannels) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/public/main/model/poll/poll_vote_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PollVoteEvent {

/// Id of the message that contains the [Poll].
int messageId;

Map<String, dynamic> json;

PollVoteEvent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class ScheduledMessageListQueryParams {
MessageTypeFilter? messageTypeFilter = MessageTypeFilter.all;

/// The result order of scheduled messages. Defaults to [ScheduledMessageListQueryOrder.createdAt].
ScheduledMessageListQueryOrder? order = ScheduledMessageListQueryOrder.createdAt;
ScheduledMessageListQueryOrder? order =
ScheduledMessageListQueryOrder.createdAt;

/// The maximum number of items per queried page.
int? limit;
Expand Down
3 changes: 1 addition & 2 deletions lib/src/public/main/query/user/muted_user_list_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ class MutedUserListQuery extends BaseQuery {
token: token,
);

final res =
await chat.apiClient.send<UserListQueryResponse<User>>(req);
final res = await chat.apiClient.send<UserListQueryResponse<User>>(req);
isLoading = false;
token = res.next;
hasNext = res.next != '';
Expand Down
6 changes: 3 additions & 3 deletions 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.1.0
version: 4.1.1
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 All @@ -21,11 +21,11 @@ dependencies:
uuid: ^3.0.7
json_annotation: ^4.8.1
encrypt: ^5.0.1
shared_preferences: ^2.1.2
shared_preferences: ^2.2.2
http: ^0.13.6
logger: ^1.4.0
mime: ^1.0.4
connectivity_plus: ^4.0.1
connectivity_plus: ^5.0.1
http_parser: ^4.0.2
web_socket_channel: ^2.4.0
universal_io: ^2.2.0
Expand Down

0 comments on commit 534fc28

Please sign in to comment.