diff --git a/CHANGELOG.md b/CHANGELOG.md index 3548d6a8..b864faf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 2d331872..8bd7130e 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/lib/src/internal/main/chat/chat.dart b/lib/src/internal/main/chat/chat.dart index 102fa831..32fd2980 100644 --- a/lib/src/internal/main/chat/chat.dart +++ b/lib/src/internal/main/chat/chat.dart @@ -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 { diff --git a/lib/src/internal/main/chat/chat_event_handler.dart b/lib/src/internal/main/chat/chat_event_handler.dart index 787a668a..1e6b607d 100644 --- a/lib/src/internal/main/chat/chat_event_handler.dart +++ b/lib/src/internal/main/chat/chat_event_handler.dart @@ -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); } diff --git a/lib/src/internal/main/chat/chat_user.dart b/lib/src/internal/main/chat/chat_user.dart index 8d3141b8..83935a3b 100644 --- a/lib/src/internal/main/chat/chat_user.dart +++ b/lib/src/internal/main/chat/chat_user.dart @@ -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(); } @@ -73,8 +75,7 @@ extension ChatUser on Chat { Future getDoNotDisturb() async { sbLog.i(StackTrace.current); - return await apiClient - .send(UserDoNotDisturbGetRequest(this)); + return await apiClient.send(UserDoNotDisturbGetRequest(this)); } Future setSnoozePeriod({ @@ -105,7 +106,6 @@ extension ChatUser on Chat { Future getSnoozePeriod() async { sbLog.i(StackTrace.current); - return await apiClient - .send(UserSnoozePeriodGetRequest(this)); + return await apiClient.send(UserSnoozePeriodGetRequest(this)); } } diff --git a/lib/src/internal/main/chat_cache/cache_service.dart b/lib/src/internal/main/chat_cache/cache_service.dart index a35bdc8b..6901ba61 100644 --- a/lib/src/internal/main/chat_cache/cache_service.dart +++ b/lib/src/internal/main/chat_cache/cache_service.dart @@ -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); } } diff --git a/lib/src/internal/main/logger/logger_stack_trace.dart b/lib/src/internal/main/logger/logger_stack_trace.dart index b5d19b94..2d65b32e 100644 --- a/lib/src/internal/main/logger/logger_stack_trace.dart +++ b/lib/src/internal/main/logger/logger_stack_trace.dart @@ -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(')', '') : '', ); } diff --git a/lib/src/internal/main/model/reconnect_task.dart b/lib/src/internal/main/model/reconnect_task.dart index aa8a9924..4c51fad7 100644 --- a/lib/src/internal/main/model/reconnect_task.dart +++ b/lib/src/internal/main/model/reconnect_task.dart @@ -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++; diff --git a/lib/src/internal/network/http/http_client/request/channel/group_channel/scheduled_message/group_channel_scheduled_message_get_list_request.dart b/lib/src/internal/network/http/http_client/request/channel/group_channel/scheduled_message/group_channel_scheduled_message_get_list_request.dart index f11a4b6a..c27a467a 100644 --- a/lib/src/internal/network/http/http_client/request/channel/group_channel/scheduled_message/group_channel_scheduled_message_get_list_request.dart +++ b/lib/src/internal/network/http/http_client/request/channel/group_channel/scheduled_message/group_channel_scheduled_message_get_list_request.dart @@ -10,7 +10,8 @@ class GroupChannelScheduledMessageListGetRequest extends ApiRequest { @override HttpMethod get method => HttpMethod.get; - final scheduledMessageListOrderEnumMap = { + final scheduledMessageListOrderEnumMap = + { ScheduledMessageListQueryOrder.createdAt: 'created_at', ScheduledMessageListQueryOrder.scheduledAt: 'scheduled_at', }; @@ -31,7 +32,8 @@ class GroupChannelScheduledMessageListGetRequest extends ApiRequest { bool? reverse, List? status, MessageTypeFilter? messageType, - ScheduledMessageListQueryOrder? order = ScheduledMessageListQueryOrder.createdAt, + ScheduledMessageListQueryOrder? order = + ScheduledMessageListQueryOrder.createdAt, }) : super(chat: chat) { url = 'scheduled_messages'; diff --git a/lib/src/internal/network/http/http_client/request/main/poll/poll_changelogs_get_request.dart b/lib/src/internal/network/http/http_client/request/main/poll/poll_changelogs_get_request.dart index 48f712ca..6982ea4c 100644 --- a/lib/src/internal/network/http/http_client/request/main/poll/poll_changelogs_get_request.dart +++ b/lib/src/internal/network/http/http_client/request/main/poll/poll_changelogs_get_request.dart @@ -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, diff --git a/lib/src/public/main/model/channel/group_channel_change_logs.dart b/lib/src/public/main/model/channel/group_channel_change_logs.dart index 73faa2fd..d197e872 100644 --- a/lib/src/public/main/model/channel/group_channel_change_logs.dart +++ b/lib/src/public/main/model/channel/group_channel_change_logs.dart @@ -32,7 +32,8 @@ class GroupChannelChangeLogs { this.token, }); - static GroupChannelChangeLogs fromJsonWithChat(Chat chat, Map json) { + static GroupChannelChangeLogs fromJsonWithChat( + Chat chat, Map json) { final res = _$GroupChannelChangeLogsFromJson(json); for (final channel in res.updatedChannels) { diff --git a/lib/src/public/main/model/poll/poll_vote_event.dart b/lib/src/public/main/model/poll/poll_vote_event.dart index 8e0d1bb5..016a410a 100644 --- a/lib/src/public/main/model/poll/poll_vote_event.dart +++ b/lib/src/public/main/model/poll/poll_vote_event.dart @@ -14,7 +14,7 @@ class PollVoteEvent { /// Id of the message that contains the [Poll]. int messageId; - + Map json; PollVoteEvent({ diff --git a/lib/src/public/main/params/message/scheduled_message_list_query_params.dart b/lib/src/public/main/params/message/scheduled_message_list_query_params.dart index 6e1d84b3..1ef3445f 100644 --- a/lib/src/public/main/params/message/scheduled_message_list_query_params.dart +++ b/lib/src/public/main/params/message/scheduled_message_list_query_params.dart @@ -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; diff --git a/lib/src/public/main/query/user/muted_user_list_query.dart b/lib/src/public/main/query/user/muted_user_list_query.dart index f7bcb330..4d3924da 100644 --- a/lib/src/public/main/query/user/muted_user_list_query.dart +++ b/lib/src/public/main/query/user/muted_user_list_query.dart @@ -42,8 +42,7 @@ class MutedUserListQuery extends BaseQuery { token: token, ); - final res = - await chat.apiClient.send>(req); + final res = await chat.apiClient.send>(req); isLoading = false; token = res.next; hasNext = res.next != ''; diff --git a/pubspec.yaml b/pubspec.yaml index d6a44505..32c8ac87 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 @@ -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